473,379 Members | 1,379 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,379 software developers and data experts.

Daylight savings time problem

Hi,

I'm trying to execute some operations based on a file's time. The
file's time is actually the file's name (e.g. FILE1_20080326170558).
So I do this:
fileTimeInSecs = time.mktime(time.strptime(timeString,
"%Y%m%d%H%M"))

timeString contains the date part of the file's name. Function
strptime returns a time_struct, but my problem is that tm_isdst is
set to 0, and when we enter daylight savings time the file's time is
off by 1 hour. This time_struct is also read only so I can't change
tm_isdst to -1.

Anyone knows how to fix it?

Mar 26 '08 #1
0 1036

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

Similar topics

3
by: Bathroom_Monkey | last post by:
For posterity's sake, here is an algorithm I created to take a GMT time and convert it to U.S. central time, accounting for daylight saving time. Note: this algorithm can be modified to work for...
2
by: hourang | last post by:
ok im getting tired of looking for an answer and coming up short with scripts that dont work. i have a application that uses GMT for all its times and needs the clients timeoffset for showing the...
1
by: Ernie | last post by:
I am creating an .ics file that when opened (via Outlook) inserts a meeting into the calendar. All works fine unless the date and time I'm inserting happens to occur on the hour the time changes...
3
by: chrisdevey | last post by:
Is there any way to make a System.Timers.Timer adjust for daylight savings time change? In a long running process I set a timer as follows for a daily expiration: _myTimer = new...
3
by: Anna | last post by:
Hi, I've already found out that .Net Framework 1.1 does not properly handle anything that is related to a non-current timezone. Since my project should be released before the release of...
3
by: mmuras | last post by:
I did not see any discussions / threads for this but if there is one please let me know: -First, I am one of only two individuals within my company's IT Dept. -We have a Windows Server 2003 R2...
4
by: Polaris431 | last post by:
I have a web application in ASP.NET that will be used globally. Data is collected on mobile devices running Windows Mobile and sent to the web server where it is stored and can be viewed. Data is...
1
by: Gil | last post by:
I'm trying to mimic the functionality of netdaysworked in excel. The code below works, except when the date starts during daylight savings time. what is the number of seconds in a day for a...
3
by: Generic Usenet Account | last post by:
Hi, Is there any way to make time-of-day adjustments for daylight savings using only standard time functions? We have a program that executes daily at a fixed time of day. After daylight...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.