Date: Fri, 7 Mar 2025 08:28:26 +0000
On Fri, 7 Mar 2025, 08:27 Jonathan Wakely, <cxx_at_[hidden]> wrote:
>
>
> On Fri, 7 Mar 2025, 05:39 Stewart Becker via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
>> Would an alternative be to provide the conversion to system_clock from
>> of __DATE__ and __TIME__ in a compile-time manner? Compilers that use
>> local time for __DATE__ and __TIME__ also know their offset from UTC.
>> The part that is missing is communicating this information to the
>> language.
>>
>> I appreciate that __DATE__ and __TIME__ are C macros which C++ adopts,
>> rather than C++ outright, so this may not be the right place to propose
>> a __TIMEZONE__ macro.
>
>
> I think you want an offset from UTC rather than a time since,
>
Sorry, that was meant to say time *zone* not time since.
otherwise you need to determine the offset, which needs chrono::tzdb to be
> usable in constexpr too!
>
>
>>
>
>
>
> On Fri, 7 Mar 2025, 05:39 Stewart Becker via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
>> Would an alternative be to provide the conversion to system_clock from
>> of __DATE__ and __TIME__ in a compile-time manner? Compilers that use
>> local time for __DATE__ and __TIME__ also know their offset from UTC.
>> The part that is missing is communicating this information to the
>> language.
>>
>> I appreciate that __DATE__ and __TIME__ are C macros which C++ adopts,
>> rather than C++ outright, so this may not be the right place to propose
>> a __TIMEZONE__ macro.
>
>
> I think you want an offset from UTC rather than a time since,
>
Sorry, that was meant to say time *zone* not time since.
otherwise you need to determine the offset, which needs chrono::tzdb to be
> usable in constexpr too!
>
>
>>
>
Received on 2025-03-07 08:28:45