Page 1 of 1

Is #PB_Compiler_Date UTC or local?

Posted: Tue Feb 04, 2025 1:23 pm
by mikejs
Quick question as per the subject line - is the date returned by #PB_Compiler_Date in UTC or local time?

Re: Is #PB_Compiler_Date UTC or local?

Posted: Tue Feb 04, 2025 6:03 pm
by Little John
mikejs wrote: Tue Feb 04, 2025 1:23 pm Quick question as per the subject line - is the date returned by #PB_Compiler_Date in UTC or local time?
It's local time (at least on Windows).

Code: Select all

; PB 6.20 beta 4 (x64)

#Mask$ = "%yyyy-%mm-%dd %hh:%ii:%ss"

Debug FormatDate(#Mask$, #PB_Compiler_Date)
Debug FormatDate(#Mask$, Date())
Debug FormatDate(#Mask$, DateUTC())

Re: Is #PB_Compiler_Date UTC or local?

Posted: Thu Feb 06, 2025 11:34 am
by mikejs
Thanks for this..

I'm in the UK, where the current timezone is the same as UTC, so the snippet you posted returns three identical timestamps. I'm guessing you get different results with #PB_Compiler_Date matching the local timestamp?

Re: Is #PB_Compiler_Date UTC or local?

Posted: Thu Feb 06, 2025 11:41 am
by Fred
Yes it's local time, I will add it to the doc

Re: Is #PB_Compiler_Date UTC or local?

Posted: Thu Feb 06, 2025 2:12 pm
by Little John
mikejs wrote: Thu Feb 06, 2025 11:34 am I'm guessing you get different results with #PB_Compiler_Date matching the local timestamp?
Yes, exactly. I forgot to mention that, sorry!

Re: Is #PB_Compiler_Date UTC or local?

Posted: Fri Feb 07, 2025 5:09 am
by kenmo
Fred wrote: Thu Feb 06, 2025 11:41 am Yes it's local time, I will add it to the doc
Would it be possible to add a #PB_Compiler_DateUTC ? :D