Closed bogdanadrianmarc closed 3 years ago
I don't believe these changes match the requested format. for n=3
Implemented
%Y-%m-%d %H:%M:%S.%3N %Z
requested
%Y-%m-%dT%H:%M:%S.%3NZ
Further, is the code assuming the time is GMT?
Is there an assumption here that the time will already be in UTC? Are we content with that?
The time will be in whatever timezone the machine the app is running on is, so if the machine's timezone is GMT the timestamps will always be in GMT. Is this ok with you @andrew-pickin-epi ?
@bogdanadrianmarc @andrew-pickin-epi We can coerce a Ruby DateTime to UTC with the .utc
method. So we could ensure that all timestamps are UTC by:
def process_timestamp(timestamp)
format_datetime(timestamp.utc)
end
I guess the question is: what should be the desired behaviour when a log message is emitted during BST?
This PR addresses issue #20 . It changes timestamp format to include milliseconds and timezone, and renames field name from
timestamp
tots
in returning JSON