![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I find my current Daylight Saving offset? | alexandicity | Linux | 2 | 06-03-2008 10:41 AM |
| Implement daylight saving. | masquerer | AIX | 1 | 05-15-2008 04:27 AM |
| Technical Note: Oracle Database Daylight Saving Time Update Guide | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 02:10 AM |
| Daylight Saving Time patch test | dangral | AIX | 1 | 02-06-2007 10:17 AM |
| disable daylight saving | ppass | SUN Solaris | 1 | 03-20-2006 08:57 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Timestamp - confusion with daylight saving time
Hello!
I'm currently working on a climatological dataset that uses unix-timestamp and a real date like 28/03/2004 02:45:00 h. in spring the unix-timestamp follows its continuos mode but in the column of the real date the time jumps one hour forward (e.g. from 1:59:59 to 3:00:00). i think this is ok if the real time would show central european daylight saving time. BUT: in autumn the unix-timestamp follows further its continuous mode and the real time as well: i.e. that the time does not step back again one hour. in the next spring the real time jumps again one hour forward. Wouldn't this mean that my data loses every year one hour in spring? Has anyone an excel-tool that enables me to verify the to different datasets while beeing sure that the real time does not change when daylight saving time is usually applied? thanks in advance |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Quote:
Code:
$ cat timetool.c
#include <stdlib.h>
#include <time.h>
main(argc,argv)
char **argv;
{
long start, now;
char buff[100];
struct tm *tm;
start=atoi(argv[1]);
for(now=start; now < (start + 18 * 600); now+=600) {
tm=localtime(&now);
strftime(buff,100, "%A %b %e, %Y %H:%M %Z", tm);
printf(" %13d = %s \n", now, buff);
}
}
$ ./timetool 1130647000
1130647000 = Sunday Oct 30, 2005 00:36 EDT
1130647600 = Sunday Oct 30, 2005 00:46 EDT
1130648200 = Sunday Oct 30, 2005 00:56 EDT
1130648800 = Sunday Oct 30, 2005 01:06 EDT
1130649400 = Sunday Oct 30, 2005 01:16 EDT
1130650000 = Sunday Oct 30, 2005 01:26 EDT
1130650600 = Sunday Oct 30, 2005 01:36 EDT
1130651200 = Sunday Oct 30, 2005 01:46 EDT
1130651800 = Sunday Oct 30, 2005 01:56 EDT
1130652400 = Sunday Oct 30, 2005 01:06 EST
1130653000 = Sunday Oct 30, 2005 01:16 EST
1130653600 = Sunday Oct 30, 2005 01:26 EST
1130654200 = Sunday Oct 30, 2005 01:36 EST
1130654800 = Sunday Oct 30, 2005 01:46 EST
1130655400 = Sunday Oct 30, 2005 01:56 EST
1130656000 = Sunday Oct 30, 2005 02:06 EST
1130656600 = Sunday Oct 30, 2005 02:16 EST
1130657200 = Sunday Oct 30, 2005 02:26 EST
$
|
||||
| Google The UNIX and Linux Forums |