Is it possible to set the timezone in browserstack? - date

I found something for the selenium test but I dont see something for manually browsing. It looks like GMT is allways used.
I look for a way to test my local site with a specific timezone. Setting the timezone for the machine would also change the timezone for my local webserver (iis on windows) and thats not what I want.
I know I can set the time offset for firefox but this is also not my preferred way, because it realy sets an offset not a timezone with a different behaviour for daylight saving time.

Currently, changing the time zone on BrowserStack 'Live' is unavailable. However, we have made a note of your request and will keep you posted.
Mukesh from BrowserStack

You can use browserstack.timezone capabilities. For more information refer https://www.browserstack.com/automate/capabilities

Related

Dart DateTime not showing right time

I am using flutter to build an app, so therefore I am also using dart. I need to use the DateTime class for a calendar.
When I execute the following line of code:
print(DateTime.now())
It prints:
2022-12-29 15:27:11.147472
I executed this code on 2023-01-04 and I executed the code at about 3:03 pm.
How do I fix this?
Thanks!
The issue was that the simulator that I was running the program on had the wrong date so it made the app show the wrong date as well.
Thank you to Soliev for helping me with the issue!
There might be a problem with the device's system clock. Make sure that the device's system clock is set to the correct date and time.
There might be a problem with the device's time zone settings. Make sure that the device's time zone settings are correct.
There might be a problem with the app's code. Double-check the code to make sure that there are no errors or bugs that could be causing the incorrect date and time to be returned

Display data of API Google Maps

I am currently developing an application with Flutter where I use the Google Maps API but I am having a problem with the display of data.
Indeed in my application it displays the arrival time (arrival_time) like this: 7:19pm.
But I would like it to display in this form: 19:19
Same for the travel time (duration) it displays 1hour24mins but I would like it to display 1h24.
How do I deal with these problems?
Thanks a lot for your help
Cordially
Thibault
Here is a screenshot:
If you can transform this dates to DateTime, then you could use intl package to transform the time.
For instance:
DateTime t = DateTime.now();
print(DateFormat.Hm().format(t));
This prints the time in 24 hours format.
You would also probably be able to also transform it to XhYm too.
Thanks a lot for your help.
So there you have it, I tried your solutions but it doesn't work.
What is strange is that when I call the API with a browser (Chrome) it displays the correct time (16:48).
But when I try in the app it returns 4:48 pm.
And suddenly I don't know how to solve this problem.
So if there are any additional parameters to pass, I would like to have them.
Thank you for your time
Cordially
Thibault

ReactJS 5.3.0 not loading from unpkg.com

We have been using the following library for months:
https://unpkg.com/react#15.3.0/dist/react.min.js
Yes - I know we can just reference 15.3 and get the URL rewrite to the latest, but they released a breaking change. That's another issue for another day. Don't get distracted.
Yesterday this simply stopped working. You'll notice that if you load the URL mentioned, that the file is TRUNCATED. Simply cuts off. This made everything we use react with break. Interestingly, if you go to the following URL (without the .js extension) - things work.
https://unpkg.com/react#15.3.0/dist/react.min
My question is - what the heck happened? Why did the URL we've been using for 8 months suddenly stop working, and who can we get to fix it. In the interim, we had a copy locally that we've started referencing (which we probably should have been doing to begin with, since we don't want the automatic upgrade). When things like this happen, who do you inform?
I'm not sure you'll find the answer as to why this file is no longer working here but based off of the website you could reached out to the creator on twitter: https://twitter.com/mjackson
On the website it says:
SUPPORT
unpkg is a free, best-effort service and cannot provide any uptime or
support guarantees.
i.e. you should probably only use this link if you are messing around with a small project and shouldn't be used for any website where you actually care about the uptime of the site.

Github Issue 'locked' event doesn't update the Issue itself

I'm using GitHub API v3 to connect to a repository and get the list of issues that were update/created since a specific date. I use these parameters to get a filtered result:
filter: all
labels: bug
state: all
sort: updated
direction: ascendent
since: date
If i find any result, for each issue I get the issue events that triggered a change (filtering for the ones that happened since date).
Everything works fine for every issue event except for locked and unlocked
events that, for some reason, don't update the issue updated field.
This leads to the inability to get then the list of issues that were updated since that specific date and therefore I don't check for the issue events.
Questions:
Is there a reason why these two events don't update the issue?
Is there an acceptable solution, except for the one where I should get all the issues and query them manually?
As of today (4th of October, 2015), I cannot reproduce this issue. If it was reproducible when the question was posted, probably it was a bug, not a feature.
Is there a reason why these two events don't update the issue?
They do update the issue (see the updated_at field) and the since parameter works fine.
Is there an acceptable solution, except for the one where I should get all the issues and query them manually?
Just use the since parameter, the way how it is supposed to work, but keep in mind the timezone could be different. Since you're in Romania (like me! :-)) and your server could be into another timezone, you may want to modify the date to match the Romanian time. That's most probably your issue. Just add/substract few hours and see if that helps.
curling the issues, I cannot reproduce the behavior you have.
On the other side, you may want to use the locked parameter which is anyway updated.

Eclipse RCP application Log View: change/set TimeZone for messages sent to the Eclipse Log view

I'm developing an RCP application that uses the Eclipse Log view.
All the messages logged have the TimeZone set to system current time.
I need to have those messages all in GMT time for example
As far as I can see, there is no direct customisation possibility regarding the emitted timestamps in the Eclipse Log view.
Subclassing of Eclipse classes etc. wouldn't help much either, since most of the things we would have to change are private fields / private methods of 'internal' classes.
Any suggestion on how I can configure the eclipse Log View plugin in my RCP application to have the time of those log messages in GMT time for instance?
Many Thanks
You can set the timezone via the system property user.timezone and the Java class java.util.TimeZone.
Example
You want to change the timezone to GMT:
System.setProperty("user.timezone", "GMT");
TimeZone.setDefault(null);
Note 1: TimeZone.setDefault(null) is required to reset the default timezone to the new value provided by user.timezone
Note 2: This will change the timezone of your JVM.