You need to sign in to do that
Don't have an account?
Aasif_
Date/Time Field - Independent of User Locale
What is the best way to create a date/time field which doesnot automatically change date/time according to logged-in user's timezone?
For example, if User1 (PST) sets the value in a date/time field as "01/01/2016 4:00 PM", then User2 (EST) should see same value in that field and not "01/01/2016 7:00 PM".
We tried using a text field and stamp this date/time on it, but the sorting on this field doesn't work.
Is there any other option?
Important requirement is - that the sorting should work properly and should be based on date/time value.
For example, if User1 (PST) sets the value in a date/time field as "01/01/2016 4:00 PM", then User2 (EST) should see same value in that field and not "01/01/2016 7:00 PM".
We tried using a text field and stamp this date/time on it, but the sorting on this field doesn't work.
Is there any other option?
Important requirement is - that the sorting should work properly and should be based on date/time value.
The general idea, is to store not a date/time itself but the number of seconds since the epoch (1/1/1970) at midnight.
The DateTime method getTime() will return the # of milliseconds since epoch, so store the results of datetime.getTime()/1000