POV-Ray : Newsgroups : povray.beta-test : `datetime(now)` issue - suggestions for a solution : Re: `datetime(now)` issue - suggestions for a solution Server Time
6 Dec 2021 05:38:41 EST (-0500)
  Re: `datetime(now)` issue - suggestions for a solution  
From: clipka
Date: 9 Aug 2021 07:33:01
Message: <6111126d$1@news.povray.org>
Am 09.08.2021 um 12:53 schrieb jr:

> a better suggestion would have been:
> 
>    [locale]
>    tz = {local|utc}
>    lang = en_GB.utf8
> 
> as you say, conf provides environment type info.  given that 'strftime()' uses
> locale, a setting to provide a preference/default could be useful.  (POV-Ray
> appears to use the locale already, anyway)

No, that's not really it.

You don't need to tell POV-Ray whether your system HAS a time zone or 
not. Because your system DOES, period. Even if that timezone happens to 
be UTC.

In the context of the issue, you have to tell POV-Ray whether you want 
to operate in the context of that time zone, or rather prefer to operate 
in a context that is universal across time zones.

And that doesn't differ based on what system you're running POV-Ray on. 
It differs based on what you want to do with POV-Ray.


As for specifying _details_ about the locale, such as the actual time 
zone, language or whatnot, that isn't much of a thing either. Your 
system has a default locale, and there's a standard interface for making 
use of that. And there's little to no point in using a different one for 
POV-Ray (except possibly on a per-scene basis, but in that case 
`povray.conf` wouldn't be the right place anyway).


>> Also, it is definitely a setting that individual scenes should be able
>> to override. ...
> 
> sure, thought setting a convenient default, and override in 'datetime()'s second
> arg, if required.

As I said, the INI file mechanism would be the way to go for such purposes.


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.