Re: AppleScript-Users Digest, Vol 13, Issue 151
Re: AppleScript-Users Digest, Vol 13, Issue 151
- Subject: Re: AppleScript-Users Digest, Vol 13, Issue 151
- From: Tim <email@hidden>
- Date: Mon, 04 Apr 2016 00:43:57 +0000
OK
Send AppleScript-Users mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.apple.com/mailman/listinfo/applescript-users
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of AppleScript-Users digest..."
Today's Topics:
1. Re: Daylight Saving bug in Numbers (HEB)
----------------------------------------------------------------------
Message: 1
Date: Sun, 03 Apr 2016 16:01:22 +0200
From: HEB <email@hidden>
To: AS users <email@hidden>
Subject: Re: Daylight Saving bug in Numbers
Message-ID: <email@hidden" target="_blank">email@hidden>
Content-Type: text/plain; charset="utf-8"
Since "only" Yvan responded to this thread, shall I interpret that as the problem being well-known, and that it is meaningless to report this yet one more time?
Too difficult for Apple to solve?
(Thanks Yvan for your good answers!)
______heb____________________________
Harald E Brandt http://bragit.com <http://bragit.com/>
> On 2016-03-30, at 21:22, Yvan KOENIG <email@hidden <mailto:email@hidden>> wrote:
>
>
>> Le 30 mars 2016 à 19:41, HEB <email@hidden <mailto:email@hidden>> a écrit :
>>
>> There is clearly a Daylight Saving bug when communicating with Numbers. I don't know if this has been reported earlier or not, so I'll describe it here:
>>
>> How to reproduce:
>>
>> Preliminary: Assume you already have a spreadsheet file in Numbers open (version 3.6.1), and that the first cell in the first row is formatted as a date.
>> FYI: In Sweden we use international date format: YYYY-MM-DD.
>>
>> tell application "Numbers"
>> tell table 1 of sheet 1 of front document
>> --Note: Daylight Saving Time started 2016-03-27
>> set value of cell 1 of row 1 to "2016-03-25"
>> return short date string of (get value of cell 1 of row 1)
>> end tell
>> end tell
>>
>> --> "2016-03-24"
>>
>> I.e, what I get back is a whole day earlier!!
>> In Numbers, the cell is "2016-03-25 00:00:00", i.e correct according to what I set it to.
>> But when I get the date via AS then it is interpreted as one hour earlier, which means it becomes the day before.
>>
>> If, on the other hand, I set the date after the start of sumertime, e.g "2016-03-28", then it behaves correctly.
>>
>> We can see that it appears to be one hour difference between Numbers and Applescript if we set a date object directly with:
>> date "2016-03-25"
>> which in Swedish expands to:
>> date "fredag 25 mars 2016 00:00:00"
>> We get:
>> tell application "Numbers"
>> tell table 1 of sheet 1 of front document
>> --Note: Daylight Saving Time started 2016-03-27
>> set value of cell 1 of row 1 to date "fredag 25 mars 2016 00:00:00"
>> return (get value of cell 1 of row 1) --In this case we get the complete date, including the exact time.
>> end tell
>> end tell
>>
>> --> date "fredag 25 mars 2016 00:00:00"
>>
>> I.e, it appears to work well know, but if we look into Numbers, the cell is now:
>> "2016-03-25 01:00:00"
>> I.e, it is one hour ahead! I did set it to midnight, but it became 1 o'clock in the morning!
>> If I do the same thing but on the 28 March, then it will remain midnight also in Numbers.
>
> I know this problem for years but I'm tired to file reports with no result.
> On 2016-04-01, at 17:49, Yvan KOENIG <email@hidden <mailto:email@hidden>> wrote:
> ...
> So, if we need to be able to extract the value which we inserted, my understanding is that we must insert a string value and use the auxiliary column with the formula =""&A1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/applescript-users/attachments/20160403/51ccf1fe/attachment.html>
------------------------------
_______________________________________________
AppleScript-Users mailing list
email@hidden
https://lists.apple.com/mailman/listinfo/applescript-users
End of AppleScript-Users Digest, Vol 13, Issue 151
**************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden