PDA

View Full Version : Set date format with timezone offset



seaworm
26 Sep 2014, 10:26 AM
Hi there,

I have a date value of "09/03/2014 20:49:41 +05:00". How can I format it in order to show it on a date type of field/column?

I tried to set the format to be 'm/d/Y H:i:s P' and result is 09/03/2014 20:49:41 -04:00. And all dates have the same datetimeoffset - -04:00. Is it using machine's timezone data? Is P the correct formatter to use?

Thanks.

slemmon
30 Sep 2014, 10:26 PM
Hi,

I believe that is correct.
When I run it I get the following which includes my GMT offset:



Wed Sep 03 2014 09:49:41 GMT-0600 (MDT)


b58

seaworm
1 Oct 2014, 5:13 AM
Hi slemmon,I want to see my actual timezone data not the machine's data. Do you have a way to go around this?Thanks.

slemmon
1 Oct 2014, 11:20 AM
Hi,

See if this example helps:

b6s