File Dates

File Time Options

File Times

PAMGuard will attempt to automatically derive a date and time from audio file names. While we have programmed in a large number of different time and date formats, we cannot capture them all so it’s sometimes necessary to tell PAMGuard exactly how to extract date and time information from a file name. Characters (a-z) and be stripped automatically, but problems arise if other numbers are present.

An example of names that can’t be unpacked automatically might be

1677738025.180912073628.d24.d8.wav

The actual date is 12 September 2018 at 07:36:28. however it is impossible for PAMGuard to work out that the date information is between the second and third ‘.’ characters and that the rest of the name should be ignored.

To define your own file format, select ‘User defined date format’ then in the format field, enter a set of characters that will tell PAMGuard how to unpack the information.

For every character in the file name that is NOT part of the date, enter the # character. The number of # must exactly match the number of characters preceding the date part of the name. Leading and trailing non numeric characters will also be stripped automatically after characters corresponding to a # have been removed.
For the date section, Java lays down strict rules for how each character should be represented details of which are here and below. Note that most of these are case sensitive, e.g. MM is for month and mm is for minute.

Letter

Date or Time Component

Presentation

Examples

G

Era designator

Text

AD

y

Year

Year

1996; 96

Y

Week year

Year

2009; 09

M

Month in year (context sensitive)

Month

July; Jul; 07

L

Month in year (standalone form)

Month

July; Jul; 07

w

Week in year

Number

27

W

Week in month

Number

2

D

Day in year

Number

189

d

Day in month

Number

10

F

Day of week in month

Number

2

E

Day name in week

Text

Tuesday; Tue

u

Day number of week (1 = Monday, …, 7 = Sunday)

Number

1

a

Am/pm marker

Text

PM

H

Hour in day (0-23)

Number

0

k

Hour in day (1-24)

Number

24

K

Hour in am/pm (0-11)

Number

0

h

Hour in am/pm (1-12)

Number

12

m

Minute in hour

Number

30

s

Second in minute

Number

55

S

Millisecond

Number

978

z

Time zone

General time zone

Pacific Standard Time; PST; GMT-08:00

Z

Time zone

RFC 822 time zone

-0800

X

Time zone

ISO 8601 time zone

-08; -0800; -08:00

The example below shows an appropriate date format string used to correctly unpack the above example file name

time Zone Dialog

Time Zone

Ideally, all PAMGuard data should be referenced to UTC, this makes it easy to align with GPS data and data from other sources.

Sometimes, it is necessary to process audio files which do not have a UTC based time encoded in their file name, but are referenced to some other time zone.

The File Date Settings dialog allows you to set the time zone and any additional time offsets for an audio file or set of audio files.

The time zone offset and optional daylight saving will be SUBTRACTED from the time value extracted from the file name.

The additional time offset will be ADDED to the time value extracted from the file name.

Check and double check that the time extracted from the file and corrected for time zone and offset is correct before processing sound file data.