Project

General

Profile

Actions

Bug #16893

closed

timezone-problem

Added by Steffen Kamper over 17 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-01-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

THE PROBLEM

If you enter date/time in BE the calculation of the timestamp is done by javascript (evaldate).
This javascript is executed from the client browser and uses the timezone of the client (user).
This calculated timestamp has the users offset and is a relative value and not absolute (GMT 0), so it is impossible
to decide later from which timezone this value is entered.

This causes problems, which i want to show by example:

- user creates record and client is GMT 0 : timestamp is created with GMT 0
- user creates record and client is GMT -8 : timestamp is created with GMT -8

When the record is displayed, the server is calculating the date value from timestamp, and the server uses the timezone of the server.
If user and server are in the same timezone, the displayed value is the same as entered, if the timezones are different, the displayed value is different to the entered value.

CASE 1:
Server is in germany GMT +1
BE-User is in the USA GMT -8 und and edit a record:
A Newsrecord should be started 20.02.2007, 9:00 am

Typo3 calculates startdate with GMT1: 18:00 (6:00 pm).
The user in USA has no possibilities to enter his wanted startdate 9:00 am (GMT +1), he has to recalculate manually.

CASE 2:
An installation has to be moved from server (germany) to a new server (USA).
After restoring DB on the new server all date entries are displayed wrong cause they are calculated now with the new server timezone.

REMARK:

$TYPO3_CONF_VARS['SYS']['serverTimeZone'] is never used in Core and doesn't help anyway, cause server calculates dates with php and server timezone.

NEXT PROBLEM:
we have an event in future (summertime), we are now in wintertime. Calculation of the Event date is wrong, complex recalculation is needed.

IDEAS FOR SOLVING:

- for every timestamp in DB an extrafield is needed with the GMZ-offset, timestamp is saved without offset (GMT 0)
so recalculating of date is easy with offsetfield

Displaying the date has following possibilities:
- with users timezone (timestamp + offset)
- with server timezone (timestamp + server offset)

this has great options included, like every event can be displayed with timezone of the client, or shown as absolute showing the timezone too.

BE- and FE-User should have stored infos of their timezone, if they are set, calculation can be automatic.

(issue imported from #M4849)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #17105: wrong time evaluation on days with daylight saving time changesClosed2007-03-09

Actions
Is duplicate of TYPO3 Core - Bug #15133: Date/time field changes its valueClosedErnesto Baschny2005-10-20

Actions
Actions

Also available in: Atom PDF