Extracting universal time/atomic time in flutter - dart

I am working on a demo app in a flutter in which I want universal date time. I am using DateTime.now() but it's giving me devise date and time. Is there any way to get standard/universal date time(America) irrespective of device date-time setup. I want that date-time fetched offline without any connectivity with the internet.

To get universal time use
DateTime.now().toUtc()
to get local time use
someDate.toLocal()
There is no support to getting DateTime for a specific locale other than the one your device is located in (configured).
There is at least one package in pub.dartlang.org that provides such a feature though.
https://pub.dartlang.org/packages/time_machine looks like it does, but I haven't used it myself yet.

Related

JIRA spent time in last month report

Is it possible to generate a report of time spent in last month?
Now when I try to generate Time Tracking Report is generating a report for all time, there are no date start/end filters.
I was using YouTrack and there it's very easy to generate such report.
There is a Chrome extension that integrates with your JIRA instance named 'JIRA Assistant' which provides a very easy to use 'Time Tracking' functionality.
You could use that for your time tracking requirements for individuals or group of users or teams.
This has the provision of giving custom time-ranges!
Providing a screenshot of how it looks like with just Chrome browser!
It has an old and a new UI that provides certain features in both the versions of the tool/extension. Hope this helps!

Check if date is correct in IOS

Currently, I am grabbing the current date by NSDate().timeIntervalSince1970. However, I am concerned that the user will change the date on the phone to mess with my app. So I was wondering which of the two options below is a more suitable fix
Is there some sort of Apple way to grab the current date from an apple server.
Is there a good and reliable API where I can grab current date?
Use the TIMEAPI available at www.timeapi.org
You can retrieve the current time in UTC here.

Adobe Analytics Click Map

I'm trying to find out if the Adobe Analytics click map plugin fails because it is ancient und apparently not maintained, or if I need to change something in my (not up to date, but not quite as ancient - H.27 ) s_code.
Now the instructions say "requires IE6 or FF3", so there is a good chance the plugin has died of old age without Adobe taking notice.
But then the documentation says
The Page ID (ClickMap) and Object ID (ClickMap) variables must be
present within a given image request after you click on at least one
link. These variables are also known as the pid and oid variables.
Generally, if s.trackInlineStats is set to true, these will
automatically populate
and while s.trackInlineStats is set to true I do not see a "pid" or "oid" parameter in the server calls. So my question is: Are there any other changes I need to make to the s_code to get the thing working, or is this broken and won't work no matter what I do ?
The error I'm getting is "invalid address" and a description of what an url is supposed to look like. I'm using Firefox (albeit not Version 3 but the lastest version) and I am logged in to the Adobe account connected to that page.
I've come across several scenarios where it broke AA tracking. Weirdness that involved things like the plugin appending "undefined" to certain various url params in the AA request, some of them causing Adobe servers to reject the hit (for example, one case was it appended "undefined" to currencyCode value and if you do not have a valid currency code value, Adobe rejects the entire hit).
I've gone to Adobe ClientCare several times over ClickMap shenanigans and eventually I was told (by Adobe) to not use the plugin, because it's always been buggy, and they basically stopped supporting it a long time ago.
As #sky pointed out, Adobe recently released their new ActivityMap reports and plugin, but it does require you to upgrade to AppMeasurement 1.6+

How do I get a list of timezone names of a browser

I want to get the browser specific timezone names (different browsers displays different text for each system setting) for system available time zones. I need the exact string of the timezone that are in the "()" when writing console.error(new Date()) but not just for my current settings, without changing my OS settings and restarting the browser each time.
AFAIK js libraries uses their own name lists to solve this but the resulting names are different from the browser timezone name. I need the name as the browser will write it.
Thanks.
It was not possible when the question was asked, but with the Intl.supportedValuesOf it is possible in modern engines:
console.log(Intl.supportedValuesOf('timeZone'));
At the time of this writing, you can ask for "calendar", "collation", "currency","numberingSystem", "timeZone" and "unit".
Intl.supportedValuesOf('timeZone') now provides the list of all available timezones on some browsers, including Safari and Chrome for iOS caniuse.com.

How do I get list of calendar app data?

For example:
I would like to access all my calendar data (default iOS App) which has user embedded data on
Start date 11/11/2013 10:00 AM with Title "Meeting w/ Australian".
Or another one,
Start date 1/1/2012 08:00 AM with Title "2012 New Year's Party".
How do I access these and put them on NSMutableArray?
Can someone help me here?
Given the quarantine-like protection built in IPhone apps, I bet you won't be able to access the info, I've never tried personally but I'm willing to bet on it.
thats probably why all the calendar apps start empty.
I would look at exporting Ical to CSV then parsing it ingot he app as a hacky way to get around it.
Good luck though.

Resources