|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
converting GMT to EST??
im using the following coding to put a sentence at the bottom of my pages that tells users when it was last updated:
PHP Code:
its displaying everything in GMT format (so when it really is 10:30PM and i just updated its really saying itslike 3:15AM....) how do i fix that?
__________________
-Alexander |
|
#2
|
|||
|
|||
|
Trying adding the difference between GMT and EST.
Hadley |
|
#3
|
|||
|
|||
|
to do that do i subtract 5 from the end of the $tsstring var?
|
|
#4
|
|||
|
|||
|
You need to subtract 5 hours from $timestamp, which is measured in seconds. (ie. $timestamp =- 5 * 3600)
Hadley |
|
#5
|
|||
|
|||
|
i inserted the line "$timestamp =- 5;" and now its saying the year is 1969...
PHP Code:
thanks-- p.s., i also tryed "adding" 5 and then it told me the date was JAnuary 1st, 1970...which is fine except its 33 years ago Last edited by Vasarab69 : January 2nd, 2003 at 05:46 PM. |
|
#6
|
|||
|
|||
|
Hmmmm. That's odd. Could you please give me the value of $timestamp before and after modification?
Thanks, Hadley |
|
#7
|
|||
|
|||
|
sure...ive just updated to make sure the time would be both syncronized....
before: Last-Modified: Thursday, January 2nd, 2003 @ 16:02pm ..... after: Last-Modified: Wednesday, December 31st, 1969 @ 11:00am ..... the first one would almost be fine (other than the fact that it would be like 45 mins off), if it werent being displayed in military time... once again, the code for the 'before' example is below: PHP Code:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > converting GMT to EST?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|