Logging timestamp format

The date and time format used by Read‑a‑Card’s logging feature can be configured within the Read‑a‑Card.ini file. The date and time may be optionally used both in the content of the log data and as part of the file or folder name of the log. This feature makes it possible to create discrete log files for each day, month or year by including %s in the log file name on the Logging tab.

Two .ini file settings control the format of the timestamp that will be used. The setting Timestamp controls the format of the timestamp used within the content of the log file, while FileNameTimestamp controls the format of the timestamp that may be incorporated in the file or folder name. This allows a full date/time timestamp to be recorded for each card entry in a set of log files, where a discrete file is created per date.

The default values for these settings in the Read‑a‑Card.ini file are as follows:

[LOG]

Timestamp = %Y-%m-%d %H:%M:%S

FileNameTimestamp =  %Y-%m-%d

The following format options may be used to control the format of the timestamp:

%a Abbreviated weekday name

%A Full weekday name

%b Abbreviated month name

%B Full month name

%c Date and time representation appropriate for location

%d Day of month as decimal number (01 ‑ 31)

%H Hour in 24‑hour format (00 ‑ 23)

%I Hour in 12‑hour format (01 ‑ 12)

%j Day of year as decimal number (001 ‑ 366)

%m Month as decimal number (01 ‑ 12)

%M Minute as decimal number (00 ‑ 59)

%p Current location AM/PM indicator for 12‑hour clock

%S Second as decimal number (00 ‑ 59)

%U Week of year as decimal number, with Sunday as first day of week (00 ‑ 53)

%w Weekday as decimal number (0 ‑ 6, where Sunday is 0)

%W Week of year as decimal number, with Monday as first day of week (00 ‑ 53)

%x Date representation for current locale

%X Time representation for current locale

%y Year without century, as decimal number (00 ‑ 99)

%Y Year with century, as decimal number

%z Either the time‑zone name or time‑zone abbreviation, depending on registry settings; no characters if time‑zone is unknown

%% Percent sign

 

The # flag can prefix any formatting code. In this case, the meaning of the format code is changed by that # as follows:

%#c Long date and time representation appropriate for current location. For example: 'Tuesday, March 14, 1995, 12:41:29'.

%#x Long date representation appropriate to current location. For example: 'Tuesday, March  14, 1995'.

%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading zeros (if any).

# is ignored for all other flags.