Printing an East Coast Timestamp in Arizona time
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-20T21:03:53Z
Indexed on
2010/04/20
21:13 UTC
Read the original article
Hit count: 227
php
Hello,
The code returns "datesubmitted" in a nice format. The field "datesubmitted" is a timestamp of East Coast time. How could I print it out as Arizona time? Right now, that would be 3 hours behind East Coast time.
For now, I would be happy just to do that. However, during other parts of the year (when Daylight Savings time is not being used), Arizona time is only 2 hours behind East Coast time. Is there a way that I could print the date below so that Arizona time is always correctly displayed? Or would I have to change the code when Daylight Savings time stops and starts?
Thanks in advance,
John
date('l, F j, Y &\nb\sp &\nb\sp g:i a &\nb\sp &\nb\sp \N\E\W &\nb\sp \Y\O\R\K &\nb\sp \T\I\M\E', strtotime($row["datesubmitted"]))
© Stack Overflow or respective owner