I agree absolutely. Having the time displayed in the user's local timezone would add significantly to the overall readability of discussions here at NetPro.
I dont think its feasible on a webserver esp with posts. How do you make it appear for all the users, how do you connect the user profile info to the thread's time stamp and make it appear in the local time zone.
Rather, I would imagine it will be much easier if all the posts are in UTC (or the old GMT) since every one knows by default their local offset from UTC(old GMT) its much easier rather than calculating Pacific Time which is esp tough for the countries where they dont observe Day Light Timesavings.
Any comment from Cisco?
In my opinion, this could be done by storing all timestamps in UTC and extending the user's profile with the information about his timezone. Then, after the user logs in, the webserver will actually recalculate the displayed time according to the user's timezone. In other words, each user will see the time in his own timezone because the server will shift the internal stored UTC time according to his settings in his profile. If it is an anonymous user (not logged in), the UTC time will be displayed.
Samuel is correct in his statement that we can't display messages in a user's local time zone. That said, we do have the flexibility to choose what time zone all messages are displayed. Samuel has suggested UTC (old GMT). Thoughts?
NetPro Community Manager
I think that using UTC will be a big improvement.
Showing local TZ will require some extra lines of code. If you ask me, the best way is to read the IP address of the requester and map it to his country.
There is a code example:
As compelling as it may sound, I do not recommend using the client's IP address to determine his timezone. While it may be advantageous if the user moves frequently from country to country, there are several drawback to this scheme:
- If the user uses some sort of VPN or IP Mobility even if abroad to access NetPro, his public IP will not change, thereby voiding the possibility to display timestamps according to the client's present position
- IP address assignments may change over time which will complicate determining the user's timezone. Moreover, there is no definitive link between IP addresses and their geographical usage. Maintaining such database up-to-date will be a daunting task. It will also introduce a new level of indirection in determining the user's timezone which may slow down things.
- A user is used to his own timezone and he may be accustomed to correcting his own timezone to the local time of the country he is presently in. I would certainly be confused if the system recalculated the time for me just because I am logging from another country than I ordinarily live in.
In my personal opinion, having the timezone defined as a part of the user's profile is more advantageous. The user is always able to change it if necessary.
You are right, automatic timezone will be hard to maintain and may have unexpected results.
Personal timezone stored in user profile and UTC for unlogged users will be great.
Thanks to all for the ideas!
Currently, the NetPro indeed does not have provisions for personalizing the user's timezone. That will require:
1.) Extending the user's profile with information about his timezone so he can set it when he updates his profile
2.) Storing all timestamps as UNIXTIME or in UTC in the NetPro database
3.) Whenever a timestamp is displayed on a webpage, call a function that will recalculate the UTC or UNIXTIME timestamp to the user's timezone.
I believe that this extension is neither major nor a difficult one. As the NetPro runs on Apache/Tomcat/Java, there should be plenty of classes already prepared for similar applications.
Not only that, there could be a whole plethora of issues (though I have no prudent understanding of Scripts).
The browser compatibility, scripts running time, etc (though I guess there are plenty of scripts that automatically get executed), and also I dont recall any website offering posts/articles automatically changing/converting the time stamps to any user locale.
I do not think that the dates are stored in the NetPro database backend in the text form. I believe that even now, whenever a time/date is displayed, some kind of function is called that converts the integer timevalue from the database to the date and time string that is displayed on the webpage. This function could therefore be logically modified to take the user's local timezone into account and make necessary shifts. In most operating systems and programming languages, there are several functions to deal with calendars and timezone conversion. This would not be developing something completely new, but rather using functions and libraries already present and available.
As for the forum software providing user local timezones, there are several of them which actually support this functionality, including phpBB, PHPNuke and others.
I noticed one thing that all the posts are being stamped as PST (Pacific Standard Time) which by technical means is -8:00 UTC. However in reality its PDT (Pacific Daylight Time) -9:00 UTC (thanks to the DST changes if CA still goes with the standard DST changes).
Is it something that I misunderstood or is it something needs to be corrected on the NetPro servers?
And one more thing, I like CNN for this reason as they always say ET/PT (so that they are not caught up in the EDT/EST or PST/PDT drama)
Any comments from Cisco?
Greetings to everyone,
Dan, is there any comment on the timezone issue? Some ideas have been voiced here, together with a high-level overview of changes necessary to implement the localized timezones. Can you please go over them once again and let us know your standpoint? The discussion here has started nice but somehow has stalled.
Looking forward to hearing from you.
Local timezone support has been added to the NetPro roadmap. Once we investigate it's feasibility we will work on launching it.
NetPro Community Manager