473,326 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to convert a given local time to UT considering Daylight Saving Times....

Hi group ,

I need a function to convert a given local time to the correct Universal
Time ( UTC/GMT). The problem is the Daylight Saving Times(DST). Unix/Linux
uses the Olson TZ database wich contains all the informations
about DSTs... Are there any functions wich make this for me ? Such a
function must use some location information like Longtitude to calculate the
right UTC offset. After that it needs to look for the DST in a database.
Anyone for an idea ? Maybe someone can point me to the right direction ...

Thanks for help
Filip

_________________________________
Filip Lyncker, Dipl.-Inform. (FH)

Ingenieurbüro Lyncker & Theis GbR
Rauenthaler Straße 8
65197 Wiesbaden

Fon 0611/89038960
Fax 0611/9406125

ly*****@lyth.de
Jul 23 '05 #1
3 2427
"Filip Lyncker" writes:
I need a function to convert a given local time to the correct Universal
Time ( UTC/GMT). The problem is the Daylight Saving Times(DST). Unix/Linux
uses the Olson TZ database wich contains all the informations
about DSTs... Are there any functions wich make this for me ? Such a
function must use some location information like Longtitude to calculate
the right UTC offset. After that it needs to look for the DST in a
database.
Anyone for an idea ? Maybe someone can point me to the right direction ...


Local time is a political/governmental decision so you can't compute it from
longitude.
Jul 23 '05 #2
Local time is a political/governmental decision so you can't compute it
from
longitude.


yes , thats the reason why im talking about a database like the olson
database...


Jul 23 '05 #3
Filip Lyncker wrote:
Local time is a political/governmental decision so you can't compute it
from
longitude.


yes , thats the reason why im talking about a database like the olson
database...


OK. So what is wrong with using that 'Olson database'
A quick google search brought up some sites which
looked promising.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dhaval | last post by:
Hi, Well I am facing this strange issue with javascript. Specifically on the 26th October 2003, when I select any roomtype I get the rate 0 if "In the Operating system, Time Zone is selected...
11
by: cwdjrxyz | last post by:
Several threads have discussed the accuracy of time calculated using script when Daylight Saving Time (DST) is considered. A page at http://webexhibits.org/daylightsaving/ gives much information on...
3
by: Randall Parker | last post by:
Suppose one has a database of UTC times that are from different dates in the past. The problem with translating those times to a local time is that one does not know for each UTC time whether the...
7
by: Angus Comber | last post by:
Hello I need to do this conversion but can't seem to find the function. Angus
1
by: luke_airig | last post by:
I'm not sure if this is the right group for this posting. If not, please accept my apologies. I have been tasked with identifying and correcting application code that will be affected by the...
1
by: davelist | last post by:
I'm guessing there is an easy way to do this but I keep going around in circles in the documentation. I have a time stamp that looks like this (corresponding to UTC time): start_time =...
2
by: Mr Pekka Niiranen | last post by:
Hi, is it possible to get the two annual daylight saving times (day, month and time) from Python by giving location in some country/location string ("Europe/Finland" for example). I need to...
3
by: bernhard Hoyler | last post by:
Hi, I would like to determine whether at a certain time point in time the daylight savings time is in effect. This means such a logic should show that today (16-Nov-2007) no daylight savings...
2
by: andreas.profous | last post by:
Hi all, I have the following problem: There are strings describing a UTC time, e.g. " 2008-01-15 22:32:30" and a string reflecting the time zone e.g. "-05:00". What is an elegant way of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.