Is #PB_Compiler_Date UTC or local?

Just starting out? Need help? Post your questions and find answers here.
mikejs
Enthusiast
Enthusiast
Posts: 175
Joined: Thu Oct 21, 2010 9:46 pm

Is #PB_Compiler_Date UTC or local?

Post by mikejs »

Quick question as per the subject line - is the date returned by #PB_Compiler_Date in UTC or local time?
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Is #PB_Compiler_Date UTC or local?

Post 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())
mikejs
Enthusiast
Enthusiast
Posts: 175
Joined: Thu Oct 21, 2010 9:46 pm

Re: Is #PB_Compiler_Date UTC or local?

Post 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?
Fred
Administrator
Administrator
Posts: 18247
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Is #PB_Compiler_Date UTC or local?

Post by Fred »

Yes it's local time, I will add it to the doc
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Is #PB_Compiler_Date UTC or local?

Post 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!
User avatar
kenmo
Addict
Addict
Posts: 2047
Joined: Tue Dec 23, 2003 3:54 am

Re: Is #PB_Compiler_Date UTC or local?

Post 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
Post Reply