-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for daylight saving time #84
Comments
From dam...@gmail.com on December 05, 2011 23:53:36 Labels: Priority-Medium |
From dam...@gmail.com on July 12, 2012 22:49:22 Status: Accepted |
From dam...@gmail.com on February 20, 2013 04:15:26 Labels: Type-Task Difficulty-High |
From modsj...@gmail.com on February 21, 2013 09:17:45 Hi Dr. Damith, I am not sure how teammates is implementing the timezone change for daylight savings however, to make sure that it is working correctly, it will be good to use the class SimpleTimeZone http://docs.oracle.com/javase/6/docs/api/java/util/SimpleTimeZone.html |
From dam...@gmail.com on February 22, 2013 04:39:47 Thanks for the pointer Allan. Whoever doing this issue should look into it. As of now, I don't think we are handling it all. |
@ashrayjain assigning to you, as discussed. |
@damithc Hey prof, it turns out we have two more fields (
An important consideration would be on how we will handle transitioning for existing sessions. What do you think? |
It has to be 2 or 3. What is the common wisdom on handling timezones and DST? Any articles on this? |
There are a lot of different opinions on StackOverflow about this, and a lot of times they are for specific cases. The best article that I think we should follow is this one. On the same article, these sections are also of interest: The general overview is that, especially when dates in the future are involved, storing the timezone ID is the best way. Other things can be used as fallbacks but timezone IDs should be used if available. |
I'm ok with storing timezone ID. We also need to discuss where to store it. For example, may be we should store in in the Course object rather than the Session object? Explore these further and we can discuss on Wednesday. |
You also need to figure out how to save DST lookup table and how to keep it updated. |
Since we will be using the standard library for Java for DST conversions, we will need to update the standard library's data. The common method for updating this data is outlined here. However, I will need to look into how it would work with GAE. |
With GAE, the standard library is locked in and out of our control. This is the only issue about this I could find. Google does seem to update its timezone data but not very frequently as it turns out. I tested the standard library on a GAE test app using known timezone/dst updates from the past year (eg. North Korea's timezone update from August 2015). From what I tested, updates until June last year are in. I would guess that Google follows a yearly update cycle for this. So the question is, if this frequency is ok for us? The other alternative is to use an external library instead of the standard library so that we can update the data as we please. The most popular alternative seems to be Joda Time. |
Yes, I'm ok to use an external library as Java built-in date library is known to be weak. Is Joda time updated more regularly? |
Yup sir. Joda seems to follow the updates to the database pretty closely. |
Yes, go ahead with Joda. |
@damithc Since we are adding timezone info to courses, I wanted to clarify some semantics. It looks like once a course is created, we don't allow the instructor to change the Course ID or Course Name (am i right?). As we will be adding the timezone option there, do we also disallow timezone updates after the course has been created? Is there any use case for timezone updates after course creation? Note: We will still allow the user to change the detected value on the course create page, BEFORE the course is created. |
@damithc bump. |
No reason not to allow it right? |
Hmm. I don't see any reason to disallow changing course name and timezone. But maybe ID is more sensitive to change? @thyageshm your thoughts? In any case, I think it will be better to add this functionality as a separate issue rather than with this one? |
Yes, editability of each field can be separate issues. Yes, editing course ID is the trickiest and may never be allowed. |
From what I understand, we have to:
Is there anything I'm missing? |
@wkurniawan07 can weigh in. He was the last person to handle this hot potato 😝 |
The plan was to ditch timezone fields in feedback sessions completely and relying fully on the one in course, which already is in Olson timezone ID. The timezone field in the courses was actually added for this purpose. For the reason that it has not been actually tried out, I cannot give a 100%-guarantee that the previous plan would actually work, although it sounds plausible on paper. Migrating the timezone field in feedback session |
Well I guess since our users have gotten used to a session time zone, we shouldn't remove it immediately. We can first migrate the session time zone field, announce support for DST, then deprecate the use of a session specific time zone before finally removing it once we're sure no one uses it anymore? |
From what I remember, we planned to show the time zone in the session (but readonly) even if it is stored in the course. That way, users will not notice a big difference UI-wise. |
@whipermr5 I forgot to link this issue as well: #5928 |
Linking to this issue which contains some discussion: #8362 |
As discussed with @tran-tien-dat, we should not worry about local date times that are ambiguous or non-existent but leave it to the library to resolve. The javadoc for However I think we should still show a message to the user if the local date time they input is ambiguous or non-existent, stating clearly which time we resolved it to and, in the ambiguous case, allow a way to select the later offset time. Useful methods: |
From dam...@gmail.com on June 30, 2011 16:11:15
Does time zone support work correctly when day light saving is involved?
Original issue: http://code.google.com/p/teammatespes/issues/detail?id=85
The text was updated successfully, but these errors were encountered: