Comments (7)
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:05 GMT
http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices/3269325
has lots of ideas as well.
Reported by yanokwa
on 2011-07-27 07:04:19
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:05 GMT
did some more digging...
time is currently stored in jr as a gmt timestamp (might be utc, so worth checking
that out). to make this work well, you'll need to change the timedata data structure
to include the offset (hours and minutes), the timezone name, and the utc timestamp
of when the timezone was generated. this extra data is needed because timezones aren't
static and you need to know when in time your timezone was generated.
http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices/3269325
has a bit more.
Reported by yanokwa
on 2011-07-27 07:27:15
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:05 GMT
My 2 cents... I think we should keep it as simple as possible.
I do agree that writing a custom string is suboptimal so we should think about that.
However, I think that sending around anything but UTC or GMT can be problematic and
should be avoided. It's better to send it through the entire system in a standard interchangeable
format and covert it at the end into the format you want. I think it's fine for users
to create widgets that show in local time and then have it transmit in UTC and let
the end product (which we don't know what that is) covert it to the desired format.
I think there is nice middle ground here but we want to avoid it becoming complex and
when you manage timezones it gets complex fast.
Reported by wbrunette
on 2011-07-27 07:56:51
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:06 GMT
Also, since Java's Date object doesn't retain the timezone (if used consistently, it
should be UTC), it would complicate a bunch of JR, Collect and Aggregate code to pass
a structured object around that tracked time zones. Better to just pass UTC and have
a JR function that retrieves the device's locale and stuff it in a auto-populated field
in the form; then let the back end reconstruct the time zone at time of data capture.
Reported by mitchellsundt
on 2011-07-27 16:33:12
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:06 GMT
agreed with passing around utc (as time in ms) but it seems dangerous not having the
timezone closely associated.
hate to use strings, but a iso8601 string is pretty standard. yyyy-mm-ddTHH:MM:SSZ±hh:mm
and it's easy to
Reported by yanokwa
on 2011-07-27 18:43:13
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:06 GMT
Standard strings are fine as long as it's supported everywhere. How does it work in
Fusion Tables for example?
Reported by wbrunette
on 2011-07-27 19:34:01
from collect.
Comment by mitchellsundt
Thursday Jul 09, 2015 at 18:06 GMT
javarosa (at least in the trunk build of collect) has timezone support. when i record
anything time related, it does save the timezone out to the xml. when i load anything
from a different timezone, it displays the time in my current time zone.
<timeStamp>2011-08-05T20:59:02.899-07</timeStamp>
<dateTime>2009-05-15T00:01:00.000-07</dateTime>
<time>23:00:00.000-07</time>
<date>2010-06-15</date>
Reported by yanokwa
on 2011-08-06 04:21:29
- Status changed:
Fixed
from collect.
Related Issues (20)
- Auto send should retry if it fails
- Provide a way to force using latest form version for draft created using old one
- Update copy on end screen HOT 6
- Apply M3 styling to user identity and change reason text fields
- Thousands seperator not shown in external integer and external decimal widget with thousands separator
- Bringing the bold font back to the hierarchy view
- In date time widget which is required tapping check for errors removes an answer if only one of them was filled HOT 1
- Scrolling doesn’t work in a group of questions while audio is being recorded
- Unable to record second sound if audio widgets are in a field-list
- Arrows in Input method in GeoShape and GeoTrace overlap "Cancel” button in the landscape view HOT 1
- "Form updates available" notication flow HOT 2
- Display message on end screen when autosend is enabled and saving drafts is disabled HOT 2
- Text field in field list snaps under keyboard when tapped to focus HOT 14
- Display preview of media in summary (e.g. images, video, audio)
- Using a different camera app to record a video in video widget which is on a field-list crashes the app on Android 10 Redmi 9T HOT 5
- The list of question is scrolled when a user closes the keybord
- Entity updates from the server HOT 1
- Adjusting max width of buttons HOT 7
- Leaks accross the ODK Collect application HOT 1
- Deleting a recorded audio in Audio widget on a field-list results in an error and closing the form
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collect.