Comments (8)
@mikewilburn How do you think this should work?
Would it be reasonable to say that all dates are at midnight UTC for the selected date? Midnight local time for the selected date?
Should we expose a date and a time field for every date?
It seems like the concept of a time doesn't really make sense for something like a tree being planted, whereas it may make sense for a tree inspection. How can we get this behavior right for Trees of Portland while keeping the app generic?
from data-collection-dotnet.
Would it be reasonable to say that all dates are at midnight UTC for the selected date? Midnight local time for the selected date?
I think midnight local time seems reasonable.
I guess something to consider is whether the time is merely entered/displayed in local time but actually stored in UTC. Is this presently the case?
Should we expose a date and a time field for every date?
I think there was a conscious decision to the drop the time component of date fields in the app (Planted_Date
& Collected_Date
) since this granularity didn't feel necessary.
As for a tree inspection, you're right - a user may want this. However, the nice thing is that this can be set in the web map via the layer's pop-up configuration dialog:
from data-collection-dotnet.
@mikewilburn Yes, the dates are always stored UTC. And really everything is correct, the only issue is the formatted string produced by the popup manager is always in UTC, but doesn't say that.
The app is always showing the formatted value from the popup manager, but I wonder if we need to do some extra work to format the dates manually? Perhaps in a user-configurable way - show UTC, local, or both..
from data-collection-dotnet.
If we ensure that a user is entering datetimes in local time, and that we display them also in local time, does this then solve that?
I think it'd be pretty unlikely for a user in a typical collection scenario to want to show datetimes in UTC, unless they're doing some simultaneous, truly global stuff. My suggestion would be that we don't need to invest the time to make date & time display configurable.
In my mind, the solution here would be to retrieve the date from the popup manager, and then format and display in local time. What do you think?
from data-collection-dotnet.
Proposed solution:
- Instead of using
PopupFieldValue.FormattedValue
directly, create aConverter
takingPopupFieldValue
- if
PopupFieldValue.OriginalValue
is date time, format manually - otherwise, return
PopupFieldValue.FormattedValue
- if
This should take about a day to implement and test.
from data-collection-dotnet.
@nCastle1 can you explain under what circumstances you think it is using the current time and associating that with the date/time value that is stored?
Assuming an offset of 8 hours between West Coast time and UTC, I have so far not been able to reproduce this behavior by setting the value to the current day.
from data-collection-dotnet.
Some observations I wanted to capture so we're aware of what this behavior is --
Note:
When capturing a date in UWP, it uses the specified date and the current time.
When capturing a date in WPF, it uses the specified date and 12:00 AM.
True for both platforms:
Once a date has been captured with a time, updating the date will continue to re-use the initially-specified time.
from data-collection-dotnet.
When testing this after 4pm PST (midnight UTC), the date that is set for a record remains consistent after the record is saved, de-selected, and re-selected.
In previous behavior (and as shown in the description gif), date/time was set according to the local time. When saved, this was interpreted as UTC time. This means when re-identifying the feature, the UTC time was displayed back in local time, meaning 8 hours (for UTC --> PST) was subtracted from the date/time and thus the date was often rewinded by a day. This was only observed for date/time fields whose date was captured after 4pm.
from data-collection-dotnet.
Related Issues (20)
- Bug: when editing a field on WPF, the field is cleared the first time the value is invalid, but not subsequent times
- Enable syncing offline map while still online
- Show app & runtime metadata alongside portal info
- UWP: inconsistent field and field value display prominence HOT 2
- UWP: logging a new tree point doesn't persist Species related record information HOT 3
- UWP: use field alias in field validation message instead HOT 3
- UWP: attachments tab not always rendered for related records
- UWP: downloading an offline map completes successfully but raises 'token required' error HOT 3
- UWP: Logging into the app is prevented HOT 3
- Resolve minor UI inconsistencies between UWP and WPF HOT 7
- UWP: update icon configuration options to appear consistent with others HOT 2
- UWP: Remove time component when saving date fields HOT 2
- WPF: background fill disappears if attachments don't exist for a related record HOT 1
- Peculiar behaviors when deleting the offline map HOT 4
- UWP: application won't view extension-less files HOT 1
- Attachments with long filenames aren't entirely visible HOT 1
- Map interact-ability isn't consistent while editing a feature HOT 7
- Attachment doesn't appear if it's the first attachment to be added to a record HOT 1
- Improve high-dpi support for sign-in window on WPF
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 data-collection-dotnet.