Project

General

Profile

Actions

Bug #18857

closed

Datetime bug because of different local time

Added by Lee Perry over 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2008-05-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I'm working with the final version of TYPO3 4.2 and I have a field in one of my own extension with a datetime:

"datetime" => Array (
"exclude" => 1,
"label" => "LLL:EXT:my_lawyer_management/locallang_db.xml:tx_mylawyermanagement_newsletterissues.datetime",
"config" => Array (
"type" => "input",
"size" => "8",
"max" => "20",
"eval" => "date",
"checkbox" => "0",
)
),

When I save a date in my default language - the date is saved as timestamp in the database with the correct date and a time of midnight. When I translate this record the date should be get from the standard-language-record - it is taken, but with a time difference of 2 hours in the past, so the date of the translated record is now from one day before.

I'm working here in Berlin, Germany so with the summertime maybe there are these 2 hours difference...

The hint from Dmitry to set the "date.timezone" in the php.ini explicitly had no effects - the problem still exists.
(issue imported from #M8522)


Files

bug-8522-datetime.diff (1.96 KB) bug-8522-datetime.diff Administrator Admin, 2008-05-27 10:44
T3X_user_datetest-0_0_1-z.t3x (2.71 KB) T3X_user_datetest-0_0_1-z.t3x Administrator Admin, 2008-05-27 10:44

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18920: Copying elements: Categories are not assigned to copyClosedErnesto Baschny2008-06-07

Actions
Actions #1

Updated by Ernesto Baschny over 16 years ago

To reproduce:

Install the "user_datetest" extension attached to the bug report. This will just create a new table with all possible datetime fields avaliable to test and also make them localizable. Follow the steps:

0) make sure your server is not running on UTC, else the bug will not show up. Any "german server" should be ok (UTC+2 currently).
1) create a "Date Tests" record, tick every checkbox to get current date and times in all fields.
2) save the record.
3) copy the record (e.g. using the clipboard): Result without the patch are shifted datetimes.
4) localize the record to another language: Result without the patch are shifted datetimes in the localized record.
5) now apply the patch.
6) repeat steps 3) and 4), watch the results.

Actions #2

Updated by Ernesto Baschny over 16 years ago

Committed to TYPO3_4-2 (rev.3735) and trunk (rev.3736).

Actions

Also available in: Atom PDF