Ask Your Question

Parse Catalog Timestamp PE 2015.3.1

asked 2016-01-25 04:14:44 -0600

FranzCC gravatar image

Hi, i'm trying to parse the output of catalog_timestamp but failing because of the last 3 positions after the seconds.
As of ISO standard, the "Z" means to abbreviate the local timezone.
E.g.: puppet outputs:


I would use the date command:

 date  '+%Y-%m-%dT%H:%M.%S%z'

Which outputs:


What are the 3 digits in my example output ? (129)

Please name the corresponding ISO date string.
IMHO the puppet output doesn't correspond to any ISO standard.

Thanks in advance


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-01-25 19:42:18 -0600

GregLarkin gravatar image

The date that Puppet displays appears to conform to Specifically, these sections:

Found in "Definitions":

  Z           A suffix which, when applied to a time, denotes a UTC
              offset of 00:00; often spoken "Zulu" from the ICAO
              phonetic alphabet representation of the letter "Z".

Then found in the examples:

5.8. Examples

Here are some examples of Internet
date/time format.


This represents 20 minutes and 50.52 seconds after the 23rd hour of    
April 12th, 1985 in UTC.

The ".129" in your sample output appears to represent fractions of a second. I don't see a way to output that exact string format using the date command, though.

This page ( doesn't seem to help much either.

edit flag offensive delete link more

answered 2016-01-26 01:15:23 -0600

FranzCC gravatar image

Hi Greg,
thanks for the answer
If 129 is a fraction, then it could be a hires timer added for the fraction of a second.
Seemingly no standard but not a big problem.
I will parse only seconds and leave the fraction out



edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-25 04:14:44 -0600

Seen: 82 times

Last updated: Jan 26 '16