[
https://issues.apache.org/jira/browse/FLEX-34861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14561049#comment-14561049
]
Alex Landini commented on FLEX-34861:
-------------------------------------
As a workaround now I did:
{code}
var date:Date = new Date();
var cloned:Date = ObjectUtil.clone(date) as Date;
cloned.seconds = 0;
cloned.milliseconds = 0;
cloned.minutes += date.timezoneOffset - cloned.timezoneOffset;
{code}
cloned is the date with seconds and milliseconds sets to 0.
> Date dst not considered with seconds/milliseconds
> -------------------------------------------------
>
> Key: FLEX-34861
> URL: https://issues.apache.org/jira/browse/FLEX-34861
> Project: Apache Flex
> Issue Type: Bug
> Components: .Unspecified - Framework
> Affects Versions: Apache Flex 4.14.1
> Reporter: Alex Landini
>
> Seconds and milliseconds reset on date during the dst change wrongly the
> timezone.
> For instance by executing the following code snippet across dst (Europe/Rome
> timezone):
> {code}
> var date:Date = new Date();
> trace(date);
> date.seconds = 0;
> trace(date);
> {code}
> it prints out:
> {code}
> Sun Oct 25 02:17:22 GMT+0200 2015
> Sun Oct 25 02:17:00 GMT+0100 2015
> {code}
> The same happens for milliseconds.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)