[TYPO3-dev] stdwrap->strftime and timezone

Kasper Skårhøj kasper2006 at typo3.com
Fri Mar 31 09:35:22 CEST 2006


Hi David,

$TYPO3_CONF_VARS['SYS']['serverTimeZone'] = 1;
is not used anywhere in the core - according to the description it is  
for extensions (at this point). So that doesn't change anything.

My bet is that strftime() looks at the timezone of your server and  
does some conversion, just as MSQL does.

However, the whole timezone issue is a mess if you ask me - I don't  
even know how it is supposed to work. And until we know that clearly  
we have no chance of fixing it correctly. I guess nobody cared here  
in Europe...

Maybe we should have a task-force for this problem.

Issues I see:
- How does/should a servers timezone affect the storage of timestamps  
in TYPO3?
- When should those dates be converted during display?
- How does  the timezone of an editor affect the date he submits?  
Especially because on the client browser of the editor the date he  
enters (assuming he is in his own timezone) gets converted to unix- 
time seconds - but wouldn't that be false on a server in another  
timezone?

Somehow it sounds very much like charset issues, but I'm not sure.

- kasper



On Mar 30, 2006, at 23:00 , David Nyffenegger wrote:

> Hi all
>
> I've made a table with a time field (TCA "config" => "eval" =>  
> "time").
> The record listing in the backend (list module) shows the same time
> which was entered in, e.g. "20:00". In the frontend, I use the  
> strftime
> from the stdwrap function to render the time. Now "21:00" is  
> displayed.
> I have setup the timezone to 1 (GMT + 1 in the localconf.php,
> $TYPO3_CONF_VARS['SYS']['serverTimeZone'] = 1;)
> When using the SQL (FROM_UNIXTIME function), I see also "21:00".
> Is it possible, that I first have to convert DB time and date values
> according to the serverTimeZone settings before rendering?
> I shortly took a look to find how the backend does the rendering of  
> time
> information from the DB, but I didn't found anything...
>
> Thanks & regards
> David
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev


- kasper

"A contribution a day keeps the fork away"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3






More information about the TYPO3-dev mailing list