BUG: Daylight savings time not calculated for wu2300

Daylight savings time is not taken into consideration when reporting the UTC time to weather underground.

Test case

Run wu2300 when daylight savings time in effect

Environment

Open2300 version: 1.11 (Current SVN)
Shared libraries:  
Server OS:  

-- RexWheeler - 07 Aug 2008

Follow up

Fix record

This can be corrected with the following patch:
 
 Index: wu2300.c
===================================================================
--- wu2300.c   (revision 11)
+++ wu2300.c   (working copy)
@@ -46,9 +46,8 @@
    /* GET DATE AND TIME FOR URL */
    
    time(&basictime);
-   basictime = basictime - atof(config.timezone) * 60 * 60;
    strftime(datestring,sizeof(datestring),"&dateutc=%Y-%m-%d+%H%%3A%M%%3A%S",
-           localtime(&basictime));
+           gmtime(&basictime));
    strcat(urlline, datestring);
Topic revision: r1 - 07 Aug 2008 - 05:45:43 - RexWheeler
 
Open2300 - Bug Report 2008x 08x 07x 053914
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback