Skip to content

SWIG: add asutcstr() method to LIGOTimeGPS wrapping

Karl Wette requested to merge ANU-CGA/lalsuite:swig-LIGOTimeGPS-asutcstr into master

Description

Outputs a UTC RFC-2822 date & time, same as lalapps_tconvert -u -R, except that nanoseconds are also included if required.

Examples:

>>> lal.LIGOTimeGPS(1100000000, 0).asutcstr()
'Fri, 14 Nov 2014 11:33:04 +0000'
>>> lal.LIGOTimeGPS(1100000000, 100).asutcstr()
'Fri, 14 Nov 2014 11:33:04.0000001 +0000'
>>> lal.LIGOTimeGPS(0, 0).asutcstr()
'Sun, 06 Jan 1980 00:00:00 +0000'
>>> lal.LIGOTimeGPS(-1, 0).asutcstr()
'Sat, 05 Jan 1980 23:59:59 +0000'
>>> lal.LIGOTimeGPS(0, -1).asutcstr()
'Sat, 05 Jan 1980 23:59:59.999999999 +0000'

API Changes and Justification

Backwards Compatible Changes

  • This change introduces no API changes
  • This change adds new API calls

Backwards Incompatible Changes

  • This change modifies an existing API
  • This change removes an existing API

Review Status

N/A

Merge request reports