Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-03

packed date-time

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aitor Santamaria Merino

Hi,

Does anyone know if I can compare dates/times by comparing the packed date-time returned by FindFirst?

I have checked the DOS documentation and I seemed to find this:

Bitfields for file time:

Bit(s) Description (Table 01665)
15-11 hours (0-23)
10-5 minutes
4-0 seconds/2

Bitfields for file date:

Bit(s) Description (Table 01666)
15-9 year - 1980
8-5 month
4-0 day

But I am asking just in case FPC's PackTime, FindFirst and UnPackTime work in a different manner.

Thanks!

Aitor

Ingmar Tulva
to Aitor Santamaria Merino

On Tue, 19 Mar 2002, Aitor Santamaria Merino wrote:

}But I am asking just in case FPC's PackTime, FindFirst and UnPackTime }work in a different manner.

AFAIK, the 'packed' date-time is the one stored in DOS file record, so it cannot be compiler-dependent - unless FindFirst/FindNext do some strange conversion. So, the packed values should indeed be comparable, at least under all OS-s derived from DOS.

Ingmar