taskGNU Astronomy Utilities - Tasks: task #15555, Account for timezone in date...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15555: Account for timezone in date strings in --datetosec

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Sat 22 Feb 2020 10:01:40 PM UTC
   
 
Should Start On:  Sat 22 Feb 2020 12:00:00 AM UTC Should be Finished on:  Sat 22 Feb 2020 12:00:00 AM UTC
Category:  Fits Priority:  5 - Normal
Item Group:  Crash Status:  None
Privacy:  Public Assigned to:  None
Percent Complete:  10% Open/Closed:  Open
Effort:  0.00

Wed 20 May 2020 07:47:10 PM UTC, comment #2: 

Antonio Diaz Diaz suggested consulting Paul Eggert (who is the coordinator for the IANA time-zone database, and a GNU fellow).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sun 23 Feb 2020 01:31:24 AM UTC, comment #1: 

Part of the job has been implemented and pushed to the main repository.

The implemented part is the `Z' character at the end of the date-time string. According to the w3.org standard, when its present in effect, it just means that the timezone is zero (or the time is in UTC). So this part was pretty easy to implement.

The second part is also easy (to parse the timezone `+hh:mm' or `-hh:mm' and add it to the `tp->tm_gmtoff' (see the GNU C library for more on this). But the complication is that the FITS standard also allows sub-second times (with a decimal point in the seconds). So we also have to account for that.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sat 22 Feb 2020 10:01:40 PM UTC, original submission:  

The FITS standard's definition of the DATE keyword includes the following format: `YYYY-MM-DDThh:mm:ss', assuming the time is in UTC.

However, beyond the FITS standard, in the larger community there is also the option to add timezone information, for example with a `Z' in the end of the date string.

Although its not in the standard, some date writers may implement this extra piece of information in the string. So we should also be able to read and implement it (apply the timezone and finally return the seconds in UTC).

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-23 makhlaghi Percent Complete0% 10%
    2020-02-22 makhlaghi Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code