[GNC] Security timezone

john jralls at ceridwen.us
Tue Apr 4 00:03:22 EDT 2023


Nope. Whoever implemented that 20 years ago didn't hook it up to anything and nobody has since. Maybe because the implementation itself isn't very useful. It's saved as a string, and only  "Asia/Tokyo", "Australia/Sydney", "America/New_York", "America/Chicago", "Europe/London", or "Europe/Paris" are available. To apply it to a time would require conversion to a gmtoffset.

But once you had that what would you do with it? Quotes almost never have a time on them. I guess you could apply a rule that says that if right now is between 0900 and 1600 on the indicated date (quotes do usually have dates) in the security's time zone then that's the time of the quote, otherwise it's 1600 in that timezone on the indicated date. The quote display would have to be tz-sensitive too. I'm not at all convinced that doing all of that would materially improve anything, and implementing it would be a lot of work.

Regards,
John Ralls

> On Apr 3, 2023, at 1:21 AM, Fred Tydeman <tydeman.fred at gmail.com> wrote:
> 
> So, does it matter what Timezone I pick for a security in the Security Editor?
> In particular, "Use local time" versus "America/New_York"?
> 
> On Sun, Apr 2, 2023 at 6:57 PM john <jralls at ceridwen.us <mailto:jralls at ceridwen.us>> wrote:
>> 
>> > On Apr 2, 2023, at 1:37 AM, Fred Tydeman <tydeman.fred at gmail.com <mailto:tydeman.fred at gmail.com>> wrote:
>> > 
>> > I am talking about price quotes.  I am trying to get month end and quarter end valuations.
>> > So that I can compare what GnuCash has versus statements from broker (to see if I have
>> > any missing or wrong transactions).
>> > 
>> > In a couple of years, I plan on living full time on a ship as it travels around the world.
>> 
>> So the problem is that the quotes were as usual undated and although it was still 31 March at home it was 1 April where you are now and since the quotes didn't have a date on them GnuCash was marking them as 1 April, and that breaks reports using the nearest before price source.
>> 
>> The easiest way to handle that is to set the TZ variable to whatever time zone the market you're interested is in, but there's no good solution even possible if you hold securities traded in multiple time zones, especially if some are in Asia and others in America.
>> 
>> Regards,
>> John Ralls
>> 



More information about the gnucash-user mailing list