I am getting "There are too many writes to properties at this time. Please wait up to 12 hours for the changes to be processed." when try to read or write properties using PropertiesService class.
Originally I thought the script hit daily quotes and I stopped the script for 24 hours, but after 24 hours I got the same error, however there were no any account activity for 24 hours.
Is it still the issue with quotes ? Is it quote issues or something else ?
Thanks,
Andrey.
We have tried using IST minus the difference between IST and CST, so that we can get CST time (the SUT's time), but it won't work when daylight saving time comes. Kindly someone help on this to get the SUT time.
You can't directly take the time zone from a SUT. There are a few methods to do what you're trying to accomplish:
1. Screen capture the time on the SUT.
Using OCR, isolate the searchRectangle to the system's clock. Then readtext() and save the read text to a variable myTime.
2. Remote commands (mobile SUTs only).
You can send a remote command to a SUT using the Eggplant function ExecuteRemoteCommand(). From Eggplant's documentation:
"On Android, ExecuteRemoteCommand runs as a shell command on the
actual phone.
On iOS, ExecuteRemoteCommand runs the command as
JavaScript, making calls to the Apple UIAutomation API."
You can save the output of these commands to a variable, so on an Android SUT it would be:
set SUT_time to ExecuteRemoteCommand(date)
SUT_time will now represent the time in the format Mon Jul 31 21:09:28 CDT 2017.
3. Math!
Given your current system's date and time, you should always be able to calculate the time of any given timezone. Currently, that would work out as:
set SUT_time to the date minus 10 hours 30 minutes
To make this compatible with daylight saving's time, you'll have to use an if statement. That might look something like this:
set CST to the date minus 10 hours 30 minutes
if CST is between "Mar 11" and "Nov 4" then
add 1 hour to CST
end if
I have an API that is returning data like this:
[[1484197227000,55.9],[1484334143000,58.0]]
The timestamps are already formatted in the user's local timezone by the server, so I thought by setting useUTC to false, that would work out - in this particular example, the user's timezone is EST. If I take the timestamp of the first data point and see what it evaluates to in the browser, I get:
new Date(1484197227000)
Thu Jan 12 2017 00:00:27 GMT-0500 (EST)
Which is what I would expect.
However, Highstock is translating this date to 05:00:27, so it's still 5 hours off. How can I get Highstock to just honor the timestamp without attempting to transform it at all? If I turn useUTC back on, then it is 8 hours off. Do I need to do something like write a custom getTimezoneOffset function to subtract out the timezone that the server already translated the date to? That seems a bit odd to me.
I have an ActiveSuppport::TimeWithZone object and I want to find out how many minutes after 11 AM on that day it is. So, for example, if the time is 11:47 AM, I want the answer to be 47.
Is there a way in Ruby/Rails to do this.
Thanks!
Subtracting one Time object from another gives the difference in seconds. Just divide by 60 to get minutes.
(mytime - Time.parse('11 AM')) / 60
As the subject asks; do UNIX timestamps change in each timezone?
For example, if I sent a request to another email the other side of the world saying, "Send out an email when the time is 1397484936", would the other server's timestamp be 12 hours behind my own?
The definition of UNIX timestamp is time zone independent. The UNIX timestamp is the number of seconds (or milliseconds) elapsed since an absolute point in time, midnight of Jan 1 1970 in UTC time. (UTC is Greenwich Mean Time without Daylight Savings time adjustments.)
Regardless of your time zone, the UNIX timestamp represents a moment that is the same everywhere. Of course you can convert back and forth to a local time zone representation (time 1397484936 is such-and-such local time in New York, or some other local time in Djakarta) if you want.
The article at http://en.wikipedia.org/wiki/Unix_time is pretty impressive if you'd like a longer read.
Unix time is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970. So the answer is no
Unix timestamps do not change accross timezones, they are created for the purpose of having a standard time across globe.
NOTE:-
Timestamps are calculated on the basis of current time in the computer thus do not rely on them until and unless you are very sure about the time settings in the participating machines.
Someone stated that "UTC is Greenwich Mean Time without Daylight Savings time adjustments." This is simply untrue. GMT does not have Dayllight Savings Time. GMT is measured in Greenwich, England (at the Naval Obeservatory) [0 longitude, but not 0 lattitude]. UTC is measured at the equator [0 longitude and 0 lattitude - which happens to lie in the ocean off the cost of Africa].
What difference does it make? It doesn't make a difference in terms of "what time of day is it?" It does, however, make a difference in terms of calculating a year. Now you'd think a year would be measured based upon the location of the center (the core) of the earth, right? When the earth's core is back in the same location it was ~365 days ago, it has been a year. It isn't measured that way. It is measured by a specific location on the earth getting back to the same location (relative to the sun) that it was ~365 days ago. But the period of a day and a year don't divide evenly. Once the earth is back to about where it was a year ago, the earth isn't facing the same direction it was last year, so that spot on the earth isn't facing the same direction it was a year ago. Being further north, Greenwich isn't going to get back to the same spot (relative to the sun) that it was last year at the same time that 0 Lat / 0 Long is. So if you base the definition on Greenwith vs. 0/0, you get a, albeit slightly, different answer to the question "how many days are in a year". To put it another way, when a given spot on the earth gets back to where it was a year ago (relative to the Sun), the core of the earth isn't in the same spot it was a year ago, so what spot you pick matters because the core of the earth is going to be in a different spot (relative to the sun) than it was one year ago, if you pick a different spot on the earth.
Neither UTC nor GMT have daylight savings time. Europe/London time, the timezone that Greenwich resides in, does. But GMT does not. GMT is, what Americans would call a "Standard Time" - i.e. without DST.
Getting back to the question, Epoch time doesn't technically have a timezone. It is based on a particular point in time, which just so happens to line up to an "even" UTC time (at the exact beginning of a year and a decade, etc.). If that concept doesn't fit well in your brain, and if it helps to think of Epoch time as being in UTC, go right ahead. You're in good company and in the grand scheme of things, it really doesn't matter. You ever see those law suits where somoene is awarded $1. It's kind of a "you're right, but it doesn't really matter" type of verdict. If someone sued you for saying Epoch time is in the UTC timezone, they would win $1. That wouldn't buy them a cup of coffee at any Starbucks in any timezone on the planet.
IF both computers are set up correctly with their clocks set for the correct timezone and UTC values, they should return the same value.
Of course that's a big IF. There's almost certain to be a difference of at least a second, more often minutes between the time reported by two computers. And many computers are set up to have incorrect timezone settings, and will report their local time when asked a timestamp rather than UTC.
And in that lies the difference between theory and practice. In theory it's all the same, in practice you should not rely on it.
No, epoch timestamp should not change, because it has a fixed timezone which is UTC.
If you want to use a time object in other time zone, just look it up in libraries of the language you use, but do NOT try to add/substract a couple of hours from epoch timestamp and assume it's in another time zone, which will make things very confusing to other people, especially when you expose it in your API.
If you use C++, I recommend this library. I heard it will soon be added into standard library.
For all, I understand sometimes time object is hard to deal with and it looks easier to add/substruct on epoch timestamp. Please don't do it and do not persuade others to do it. A time object is much easier once you get used to it and can take care of time zone conversion easily without messing up with historical time zone changes due to politics/law etc...