DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: KB Timezone Fix (3.8.0)

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2006-04-20T15:28:17
Author:Bernhard Kraft
Email:kraftb@kraftb.at
Info 3:
Info 4:

EXT: KB Timezone Fix (3.8.0)

Extension Key: kb_timezone_380

Copyright 2000-2002, Bernhard Kraft, <kraftb@kraftb.at>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: KB Timezone Fix (3.8.0) 1

Introduction 1

What does it do? 1

Adminstration 1

Known problems 2

To-Do list 2

Changelog 2

Introduction

What does it do?

This extension is a bugfixing extension which solves the problem of mysteriously changing time-fields (You input 10:00 o'clock but 9:00 o'clock get's displayed on the website). The problem which causes this is most probably timezones. When you (the machine from which you are browsing/administrating your TYPO3 site) and the Web-server are located in different time-zones then it will occur that date's which you entered are in the meaning of your local time-zone.

This results in the following outcome if you publish a news for example from GMT+2 (Eastern Europe) and the web-server is located in GMT+1 (Central Europe):

  • You enter a date in GMT+2 meaning i.e. 10:00. This date get's converted to a UNIX timestamp (which doesn't care about timezones) and has a “general” meaning of “that point of time”. This conversion happens in the browser.
  • You click submit in the T3 BE. The UNIX timestamp get's transmitted to the server and stored in the DB – as is.
  • Somebody (or you) view the page in the FE. The server displays the UNIX timestamp in his timezone (GMT+1) which is one hour “less” (9:00) than what you entered. This is because at the time it is 10:00 in Eastern Europe it is only 9:00 in Central Europa at the same time.

Adminstration

Install the extension. By deafult all date/datetime fields are configured to respect time zones properly and always display the entered values in the FE. This is achieved by converting the timestamps to “UTC meaning” during transfer (Ask me on #typo3 , irc.freenode.net for more information).

If you wish that only specific fields show this behaviour you have to disable [SYS][respectTimeZones] in the Install Tool (set to 0).

You then have the possiblity to enable it for certain fields by adding the value “respectTimeZone” to the evalList of the field in it's TCA configuration. For example for the “starttime” field of tt_content:

'starttime' => Array (
  'exclude' => 1,
  'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
  'config' => Array (
    'type' => 'input',
    'size' => '8',
    'max' => '20',
    'eval' => 'datetime,respectTimeZone',
    'checkbox' => '0',
    'default' => '0'
  )
),

Please note that one time (for ext_localconf configuration) the Plural “respectTimeZones” was choosen and for the TCA single field configuration the Singular “respectTimeZone” ... don't mix those up. The reason for this is more a logical one: By setting the ext_localconf value you enable the feature for ALL fields (Plural) and with the TCA setting only for one (Singular).

Known problems

Please report further problems to: kraftb (at) kraftb.at or contact me on #typo3 or #typo3-dev on irc.freenode.net.

If this extension shows that the patch works properly it should get integrated into the core – if respectTimeZones should get set by default has to get decided.

To-Do list

Implement the fix for 3.8.1 and 4.0.0

Changelog

Version :

Version

Version :

Date

Date :

Changelog

Changelog :

0.0.0

Version

0.0.0

Date

2006-04-20 15:00 CET

Changelog

Initial release

{Changelog}

Sponsoring

Money is rare in todays world – so if your company is happy to have enough of it and you find this (my) extensions useful feel free to transfer an amount which suits your taste to “ kraftb@kraftb.at ” via PayPal. Thanks for your support.

If you are a one-man freelancer show like me and have to keep track of finance yourself please do not send me your last bit of money ! I would feel bad accepting money from someone who pherhaps has even less than me. So this call is only directed to companies who are suited well enough. You can also add the sponsored money to your expenses for taxes cause I will properly pay income-taxes for the received money. So it would again be no clever idea to sponsor money for which you already paid those taxes.

Companies which have sponsored money can get listed on my (soon coming) website including or excluding the amount of sponsored money completely as they like.

img-1 EXT: KB Timezone Fix (3.8.0) - 2