Microsoft
Software
Hardware
Network
Question : Converting GMT to EST
Experts, I'm pulling an XML feed that has a field called "date_time" with dates in this format:
2010-09-05 19:30:00
2010-09-06 20:00:00
2010-09-07 00:00:00
To translate $date_time for my users, I've parsed this data as follows:
$shortdate = substr($date_time,0,10); // Appears as 2010-09-02 23:30
$year = substr($date_time,0,4); // Appears as 2010
$day = substr($date_time,8,2); // Appears as 02
$weekday = date("l", mktime(0,0,0,$month,$day,$
year)); // Appears as Thursday
$gametime = substr($date_time,11,5); // Appears as 23:30
My users are in the USA Eastern Time Zone.
date_default_timezone_set(
'America/N
ew_York');
I am mainly interested in the Day of the Week and the time.
When I run my parsing on this:
2010-09-07 00:00:00
I get: Tuesday, 00:00.
Unfortunately, in New York (EST)
This will confuse my users because the game is really:
Monday, 8:00 PM
What is the best way to turn "2010-09-07 00:00:00" into "Monday, 8:00 PM"?
Thanks in advance!
-Dan
Answer : Converting GMT to EST
Here You go --
1: 2: 3:
<? echo date("D, h:i A",strtotime("2010-09-07 00:00:00") -3600 *4 ) ; ?>
Random Solutions
SSIS and variable issues
Physical installation of the Exchange 2007
BESX 5.0.1.4 and Exchange 2010 Users can't activate enterprise email
How to burn multiple copies with roxio creator
If folder does not exist, then create one
visual studio 2008 installation issue
Asp.Net I need help. I am not passing Date values to my the Conrol Parameters?? in a SqlDatasource using Ajax
IIS Web site works in all browsers except Safari on Mac
how to implement virtual mode in the DataGridView control?
publishing websites in TMG 2010