When I load a record and get the lastmodifieddate,...
# suitescript
s
When I load a record and get the lastmodifieddate, and when I search.createSearch for the lastmodifieddate I am getting something completely different. 1 returns 2:36pm and another 11:36. Anyone know how to, on a search, get it to return the proper time?
c
It should respect time zones
You may have to convert using N/format
s
that's what I would think.I'll try that. I was using momentJS
c
you can use moment all you want but make sure you convert the date to the current server-side format.. so 2:36pm local (im guessing eastern) would be 11:36pm server (if west coast) so it should convert correctly
b
i think you have that backwards
11:36 am 2:36 pm
but my comment is that 11:36 and 2:36 pm may be the same time
c
you're right, it IS the same time, just 1 is client which appears to be eastern and one is reading it as the server which is PST (3 hours behind)
you just gotta make sure you convert the times appropriately so they are of the same timezone representation otherwise they will ALWAYS be off