change time to EST in php and store in mysql

adamikuno

New Member
[*]I have a report which will give me the time field as \[code\]$time='Wed, 25 Aug 2010 13:43:38 +0000'.\[/code\] I am currently storing this into my MySql DB exactly like this and generating a custom report with the same time. I am in EST time so i want to know how i can change the $time field to show it according to \[code\]'Wed, 25 Aug 2010 09:43:38 '\[/code\]. i want to remove that +0000 and change the timings to EST. I want to store it into the DB in this format, which i saved as a varchar. [*]I also want to be able to split this $time and save it as \[code\]$timeday='Wed, 25 Aug 2010'\[/code\] and \[code\]$timetime='09:43:38'\[/code\]. splitting it by counting the no of characters might work but problem would arise when it is like \[code\]Wed, 9 Aug 2010\[/code\] or if i get the report time as \[code\]Wed, 1 Sept 2010\[/code\], which i am not sure whether the month would always be 3 characters or can change.Thank you :)
 
Back
Top