Location-dependant time zones

Bug #510480 reported by jyotish
94
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Wishlist
Alexander Wolf

Bug Description

As an example, when i set any city in country India and input a date in the past say 29th nov 1978 at 01:03AM, i see that the sun is shining bright in the sky and all the rising constellations and sky are wrong.

Now with the same city/country location when i set the time and date what it would have been in US PT then the correct sky chart show up. It would be great if the date/time recognizes what country/location has been selected and considers 'local' time of that country.

*****************

2010-01-20T18:49:06
C:\Program Files\Stellarium\stellarium.exe
Windows XP
Compiled with GCC 3.4.2
Qt runtime version: 4.5.0
Qt compilation version: 4.5.0
Addressing mode: 32-bit
Total memory: 2014 MB (unreliable)
Total virtual memory: 2047 MB (unreliable)
Physical memory in use: 57%
Processor speed: 1995 MHz
Processor name: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
Processor speed: 1995 MHz
Processor name: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
 -------------------------------------------------------
[ This is Stellarium 0.10.2 - http://www.stellarium.org ]
[ Copyright (C) 2000-2009 Fabien Chereau et al ]
 -------------------------------------------------------
Writing log file to: "C:/Documents and Settings/ybajpai/Application Data/Stellarium/log.txt"
File search paths:
  0 . "C:/Documents and Settings/ybajpai/Application Data/Stellarium"
  1 . "."
Config file is: "C:/Documents and Settings/ybajpai/Application Data/Stellarium/config.ini"
Cache directory is: "C:\Documents and Settings\ybajpai\Local Settings\Application Data\stellarium\stellarium\cache"
Sky language is "en"
Application language is "en"
Loading Solar System data ...
Loaded 38 / 38 planet orbits
Loading star data ...
Loading "stars_0_0v0_1.cat": 0_0v0_1; 5013
Loading "stars_1_0v0_1.cat": 1_0v0_1; 21999
Loading "stars_2_0v0_1.cat": 2_0v0_1; 151416
Loading "stars_3_1v0_0.cat": 3_1v0_0; 434064
Finished loading star catalogue data, max_geodesic_level: 3
navigation/preset_sky_time is a double - treating as jday: 2.45151e+06
Loaded 10051 / 13226 NGC records
Loading NGC name data ...
Loaded 222 / 222 NGC name records successfully
Loaded 88 / 88 constellation records successfully for culture "western"
Loaded 85 / 85 constellation art records successfully for culture "western"
Loaded 89 / 89 constellation names
Loading constellation boundary data ...
Loaded 782 constellation boundary segments
Loading star names from "./skycultures/western/star_names.fab"
Loaded 230 / 230 common star names
Loading star names from "./stars/default/name.fab"
Loaded 3215 / 4359 scientific star names
Creating GUI ...
Can't begin another download while "http://www.stellarium.org/wiki/index.php?title=Stars/files&action=raw" is still in progress.

Related branches

tags: removed: local location timezone
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

This is not an "error", but a misunderstanding or a missing feature. To make it clear for future inquiries:

The time shown in Stellarium is your computer's local time, not the local time of the location selected in Stellarium. A location's local time will match Stellarium's displayed time only if that location's time zone matches your computer's time zone. When you use Stellarium to display the sky over locations in other time zones, you should mind the time difference.

You can override the way Stellarium interprets your computer's time by editing the config.ini file. (On Windows XP, it should be in "Documents and Settings/YourUserName/Application Data/Stellarium".) Look for "time_zone" under "[localization]". The default value is "system_default". The accepted values are different for the different systems, but "UTC", "UTC+value" and "UTC-value" should work (without the quotation marks).

Changed in stellarium:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
m kroeger (mkkroeger) wrote :

When I use UTC instead of system_default instead of system_default, the sky changes but the displayed time does not. Moreover, the sky does not match what should be seen. My system time is US/Central or GMT-6. If I use UTC-6 or UTC-06 or GMT-6 or GMT-06, the sky does not match (by a lot) what I correctly see with system_default. In all cases, the displayed time is my PC system time. I am using 0.10.4 on XPSP3

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

m kroeger,

Please try UTC+6 and report the result. It seems that there may be a sign error somewhere and time zone offsets are interpreted as their opposites. Also, beware of bug #487232 - after Stellarium starts, press 8 to normalize the time.

Revision history for this message
m kroeger (mkkroeger) wrote :

Thanks for the suggestion. I'm using 0.10.4 on XPSP3 with ATI Mobility Radeon X1400

I start with system_default. Time = 11PM US/Central. Sky is dark

I set time_zone to UTC+6. Time displayed is 23:02. Sky is close but not the same. Vega and Altair are higher in the East. Appears to be off by an hour.

I set time_zone to UTC+5. Time displayed is 23:07. Sky matches system_default.

I set time_zone back to system_default and checked system time. Windows time is GMT-6 US/Central. Daylight Savings Time confusion?

However, the bigger issue is that although the sky changed to match time_zone (more or less), the displayed time always reported system time. It would seem advisable to never change the time zone away from system time.

Yes, I had seen bug 487232 but pressing 8 did not seem to change anything for me.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

It turns out that the value of the "time_zone" field in the configuration file is interpreted as a TZ system variable value, not as the commonly used human-readable "UTC+offset" values.

See here for an explanation of why "UTC-6" doesn't have the expected result:
http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html

Basically, the "offset" is interpreted as the number of hours that should be _added_ to local time to get UTC.

You can try entering some human-readable time zone name as recognised by the tz utility:
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
You can try "America/Chicago", perhaps? I am not sure if the time zone names used by tz on Unix/Linux will be recognized on Windows.

Stellarium's user manual most definitely needs to be updated...

Revision history for this message
m kroeger (mkkroeger) wrote :

Thank you. I tried Europe/London in config.ini. My local (system) time was 8:50 AM (US/Central). Stellarium displayed the local time but the sky was dark! Perhaps, it was shifted back instead of forwards? The easiest solution would be to simply use your system time and convert in your head. Thanks for your help in attempting to resolve the issue.

Revision history for this message
Nick Fedoseev (nf) wrote :

Stellarium 0.10.5 on Windows XP.
Local timezone = UTC+2 +1(summer)
A few applications do show both UTC and local time correctly, but seems Stellarium is exactly 1 hour ahead.
For example, now it is 22:24 local, 19:24 UTC

If timezone is set to system_default then Stellariim shows the sky for 23:24 local.

The only valid solution was found after a few attempts of setting timezone in config.ini:
time_zone = UTC-4

Of course, Latitude and Longitude are set to my location (Kyyiv, Ukraine, 50N 30E)

P.S. I.m a programmer, but not downloaded sources yet. Please lt me know if you need a portion of code for obtaining UTC time from Windows or any other kind of help.

Anyway, thanks a lot for such a great piece of software!

Changed in stellarium:
assignee: nobody → Alexander Wolf (alexwolf)
milestone: none → 0.11.2
Changed in stellarium:
assignee: Alexander Wolf (alexwolf) → nobody
Changed in stellarium:
milestone: 0.11.2 → 1.0.0
Changed in stellarium:
assignee: nobody → Bogdan Marinov (daggerstab)
milestone: 1.0.0 → none
summary: - Different country location and local timezone error
+ Location-dependant time zone
summary: - Location-dependant time zone
+ Location-dependant time zones
Changed in stellarium:
assignee: Bogdan Marinov (daggerstab) → Alexander Wolf (alexwolf)
milestone: none → 1.0.0
Changed in stellarium:
status: Confirmed → In Progress
Changed in stellarium:
status: In Progress → Fix Committed
Changed in stellarium:
milestone: 1.0.0 → 0.15.1
no longer affects: stellarium/0.15
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.