Issue Details (XML | Word | Printable)

Key: CORE-694
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Cisar
Votes: 35
Watchers: 17

If you were logged in you would be able to see more operations.
Firebird Core

Support for time zones

Created: 17/Sep/03 12:00 AM   Updated: 27/Nov/18 02:14 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 4.0 Beta 1

SF_ID: 808006

 Description  « Hide
SFID: 808006#
Submitted By: pcisar

I develop application for evidence products from manufacture. Because I in timezone Europe/Prague we have daylight saving time over summer.

Summer - GMT+2
Winter - GMT+1.

Because FB stores as timestamp only localtime, when time go from daylight saving time (GMT+2) to (GMT+1) hour from 2 to 3 o'clock is in localtime twice, once in GMT+2 and once in GMT+1.

0:00 GMT+2 -> 1:00 GMT+2 -> 2:00 GMT+2 ->3:00
GMT+2 -> back to 2:00 GMT+1 -> 3:00 GMT+2, ...

And now, I can not select from database products from 2:00 to 3:00 GMT+2 and 2:00 to 3:00 GMT+1, because in DB is only localtime without timezone and when I select products, returned products is from both hours.

Problem solution is store time in DB in GMT (UTC) and when storing or getting time from/to DB recompute to client timezone.

When specifying time in SQL command, time zone may be included, for example: '2002-10-12 11:00:30 GMT+2' or '2002-10-12 11:00:30 +0200' or '2002-10-12 11:00:30 CEST' or without timezone, recompute from client timezone or for simplify use server timezone.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.