Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362265 - Java and javascript implementation of the default format for timestamp is different
Summary: Java and javascript implementation of the default format for timestamp is dif...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 02:15 EDT by Huo Zhen Zhong CLA
Modified: 2017-02-23 14:18 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Huo Zhen Zhong CLA 2011-10-28 02:15:35 EDT
Build Identifier: 

i.e. if I have 

t timestamp("yyyyMMddHHmmssffffff");
syslib.writeStdOut("current time is: " + t);

in java it prints:       2011-10-26 16:05:15
in javascript it prints: 2011-10-26-16.05.15.000000

I think they both have issues, at the minimal, it should use the same type
separator, as far as mili and micro second, I would like to know what should be
the expected value for the specific implementation. 

Reproducible: Always
Comment 1 Jeff Douglas CLA 2011-10-28 04:49:39 EDT
In javagen, the fractional part is also printed. I think you are using an older version of EDT. This as fixed and committed yesterday.

The only difference now, is what the separator is between the date and the time part. In javagen, it is a space currently. In JS it is a period. We will check into this difference.
Comment 2 Huo Zhen Zhong CLA 2011-10-31 04:55:57 EDT
Hi, Jeff

Yes, the format is OK now, but I think it has a little problem, you can see there is a line between date and time in JS:

JS:   2011-10-31-01:33:39.639000
Java: 2011-10-31 01:33:39.639000
Comment 3 Jeff Douglas CLA 2011-10-31 08:31:14 EDT
Yes, I talked it over with Scott Greer and he was supposed to fix JSGen. That's why I sent this defect over to that component. Javagen is fine.
Comment 4 Scott Greer CLA 2011-10-31 15:19:11 EDT
Fixed JS gen.
Comment 5 Huo Zhen Zhong CLA 2011-11-04 02:55:18 EDT
verified on 0.7.0.v201111030901