Hmm, in Pharo 7 I see this:
TimeZone local.
=> a LocalTimeZone(LT1:00)
{
Date today.
Date today translateToUTC.
Month month: 6 year: 2015.
(Month month: 6 year: 2015) translateToUTC } collect: [ :each | each
printString -> each start ].
=>
an Array(
'17 November 2017'->2017-11-17T00:00:00+00:00
'17 November 2017'->2017-11-17T00:00:00+00:00
'June 2015'->2015-06-01T00:00:00+00:00
'June 2015'->2015-06-01T00:00:00+00:00)
Seems correct to me. And the internal start DateAndTime is already in UTC.
> On 16 Nov 2017, at 18:36, Trussardi Dario Romano <[email protected]>
> wrote:
>
> Ciao,
>
> i have a Pharo 4.0 image run on macbook with time zone is set to Rome
> +1 UTC .
>
> When i send the translateToUTC to Date instance it is ok:
>
> Date today > 2017-11-16T00:00:00+01:00
>
> Date today translateToUTC >
> 2017-11-16T00:00:00+00:00
>
>
> But for Month instance :
>
> Month month: 6 year: 2015 >
> 2015-06-01T00:00:00+01:00
>
> ( Month month: 6 year: 2015 ) translateToUTC >
> 2015-06-01T00:00:00+01:00
>
> The same problematic is for Year instance.
>
> Considerations ?
>
> Thanks,
>
> Dario