[
https://issues.apache.org/jira/browse/FLEX-17567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637495#comment-13637495
]
Justin Mclean commented on FLEX-17567:
--------------------------------------
Can't reproduce probably fixed.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
initialize="init()">
<fx:Script>
<![CDATA[
import mx.formatters.DateFormatter;
protected function init():void
{
var df:DateFormatter = new DateFormatter();
var date:Date = new Date();
date.fullYearUTC = 1970;
date.monthUTC = 0;
date.dateUTC = 1;
date.hoursUTC = 0;
date.minutesUTC = 0;
date.secondsUTC = 0;
trace(date);
df.formatString = "DD/MM/YYYY";
trace(df.format(date));
}
]]>
</fx:Script>
</s:Application>
> The DateFormatter cannot format the date if the date in UTC is Jan 1st 1970 0
> hours 0mins 0sec and 0 milliseconds
> -----------------------------------------------------------------------------------------------------------------
>
> Key: FLEX-17567
> URL: https://issues.apache.org/jira/browse/FLEX-17567
> Project: Apache Flex
> Issue Type: Bug
> Components: Formatters
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Internet Explorer 6.x
> Language Found: English
> Reporter: Adobe JIRA
> Labels: easytest
>
> Steps to reproduce:
> 1. Create a date object and set the UTC date to Jan 1st, 1970, 00Hours,
> 00minutes, 00seconds, 000milliseconds (1970-01-01T00:00:00.000Z)
> 2. Convert this to locale date (by adding the timezone offset) - it will
> become 1970-01-01T05:30:00.000Z in IST
> 3. Use the date format to format this date intothe display format (I used the
> format string as MM/DD/YYYY)
>
> Actual Results:
> The formatter returns an empty string
>
> Expected Results:
> The formatter to return a correct formatted string
>
> Workaround (if any):
> Adding/subtracting even 1 millisecond can do the trick, but in that case, the
> displayed date would be wrong.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira