date time picker bootstrap - date

I'm developing an application where i have to create a date time picker for users,but problem is that i'm using bootstrap date time picker from here:-
for date time picker which is giving me another bydefault time.its 12 hours ahead form my local time so what i should do for this.
if u have any idea to do on another method please suggest me.
and another question is my i'm trying to converting user's time date into UTC time using this:-$datetime1=gmdate("Y-m-d H:i:s", strtotime($datetime));
and its not converting correct UTC time.please suggest me what i have to do.

the locale value for datetimepicker on the link you provided is language: 'pt-BR'. Change it to 'en-US' or any other valid value to achieve correct timezone for datetime.

Related

AEM: datepicker with timezone selector in a coral3 dialog

Is there any ready solution I could use to ask the user for a date + time + timezone in an AEM edit dialog? The Coral3 datepicker doesn't seem to support editing the timezone. I could provide an additional timezone select and have e.g. the datepicker save the date and time ignoring the browsers timezone with valueFormat="YYYY-MM-DD[T]HH:mm:00.000[Z]" , but that would mean I'd save the timezone and the date+time into two separate fields. Ideally I would have them joined into one. Any suggestions how to do that?

get Date and time according to specified another time and its timezone [in flutter]

i am developing an app in which i need to get my current date and time according to specified another time and its timezone
example -
I have a timezone (ex -"asia/bangkok") and its time as 2020-11-20 10:00 AM
And i want a new TIME according to this specified time and with my TIMEZONE
so if in asia/bangkok the time is 2020-11-20 10:00 AM ,then i want to find a TIME according to my current timezone which is "asia/kalkata" !
if anyone understood this question then kindly help me!
I'm not sure it is easily doable just using built-in methods.
There is however a package that helps out with that type of conversions.
Have a look at the Instant package:
https://pub.dev/packages/instant
The documentation describing your conversion is available at:
https://akushwarrior2.gitbook.io/instant/adv-use#converting-between-timezones

How to fix dates lagging one day behind in calendar

I'm developing a Clio integration with access to the calendar, but there's been an issue with dates. While the documentation says they expect an ISO-8601 timestamp date, it seems like there's something adding offset to the timezone value in dates being sent to the system.
For example, if I send a date 2018-05-17T23:59:59.999999-04:00 on both start_at and end_at properties when creating a calendar entry for an all day event, the value returned when fetching this entry through the API is 2018-05-17T17:00:00-07:00, which is clearly wrong. Am I missing something here?
The expected result should be something like either 2018-05-17T23:59:59-04:00 or 2018-05-18T03:59:59Z if milliseconds are ignored.
All dates are based on UTC timezone. Could it be that your site/server/script is set to a local timezone and so the dates are off for part of the day?
Try setting your scripting environment to UTC time before making any date/time-based queries.

How do I set Date AND time picker in MDriven?

I am trying to capture both date and time in MDriven, but the default for data type DateTime only shows a picker (in Web) for the date, but a time is stored in the persistency layer. How do I also capture the time?
I found this in the wiki.mdriven.net
Date-formatting You set date and time format in the Style attribute
enclosed in { }.
For example, for dates and time, {short} will show date and time in
compact format. The default date format is {shortDate}. Please refer
to the Angular guide for formatting dates
https://docs.angularjs.org/api/ng/filter/date
The date and time format are automatically localized depending on the
browser.

need to convert UTC time to current timezone of device

Im using this repo
https://github.com/remirobert/Tempo
Can someone help me understand how to grab the current time zone of the device, and then notify tempo? I am using the timeAgoNow() function of tempo to find display how long ago the post was made, but the timezone difference is messing it up. My datasource is using UTC time.
Cocoa uses UTC internally. for all of its date/time calculations.
If you create an NSDate for now:
NSDate()
You get a date that is the number of elapsed seconds since midnight, 1970 in UTC time.
Dates only have time zones when you display them.
By default logging a date to the console logs it in UTC, which can be confusing.
If I'm working on a project that does a lot of date/time calculations I'll create a debugging method that converts an NSDate to a date/time string in the current locale, which is easier to read/debug without having to mentally convert from UTC back to local time.
I have never used Tempo, so I don't know if it is using date strings, NSDate, or "internet dates" (which are also in UTC, but use a different "zero date" or "epoch date")