[Typo3-dev] BIG problem with timestamp and server at different GMT

stefano cecere scecere at krur.com
Fri Nov 19 03:44:39 CET 2004


ok, i did find the library and applied mu hack.. now it works!!!!

the library is class.t3lib_befunc.php

the hack i did was adding to the
daysUntil(), date(),datetime() function a + 7*3600 (my server is in 
west usa, timezone -7)

just like:

- - - - - - -
	function date($tstamp)	{
		return Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp + 
7*3600);
	}
- - - - - - --

the backend list view now gives me correct time and dates (at least the 
same i did enter as value)

does anybody know of any problem using this hack?
obvioulsy it would be nice to have a global costant , like
$GLOBALS['TYPO3_CONF_VARS']['SYS']['servertimezone'] = -7

and then fix the time/date functions like:
- - - - - - -
	function date($tstamp)	{
		return Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp - 
3600* $GLOBALS['TYPO3_CONF_VARS']['SYS']['servertimezone']);
	}
- - - - - - --

stefano


On 18 Nov 2004, at 14:28, stefano cecere wrote:

> ok, i managed to fix the problem in the FE
>
> but i can't find teh function that renders the 'date' field in a list 
> viw of the backend (to hack it with my server's timezone)
>
> ps: i think it would be quite easy then to implement a global variable 
> "server's timezone (a simple -12 ... +12), then add it (multiplied by 
> 60*60) when rendering a timestamp..
>
> at least i can simulate to have the server in my timezone!
>
> does anybody know where that function/class is?
> many thanks
> stefano





More information about the TYPO3-dev mailing list