litesoft
Diff Revisions
857
vs
858
for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/UtilDateAdaptor.java
|
@@ -12,12 +12,17 @@ |
12 |
12 |
|
*/ |
13 |
13 |
|
public class UtilDateAdaptor extends LL_UtilDateAdaptor implements TimestampWithResolutionAccessor, YearMonthDayAccessor |
14 |
14 |
|
{ |
|
15 |
+ |
private UtilDateAdaptor( long pUTC, int pTimeFields ) |
|
16 |
+ |
{ |
|
17 |
+ |
super( new Date( pUTC ), pTimeFields ); |
|
18 |
+ |
} |
|
19 |
+ |
|
15 |
20 |
|
/** |
16 |
21 |
|
* create with NOW |
17 |
22 |
|
*/ |
18 |
23 |
|
public UtilDateAdaptor() |
19 |
24 |
|
{ |
20 |
|
- |
this( new Date() ); |
|
25 |
+ |
this( System.currentTimeMillis(), 4 ); |
21 |
26 |
|
} |
22 |
27 |
|
|
23 |
28 |
|
public UtilDateAdaptor( Date pDate ) |
|
@@ -58,11 +63,6 @@ |
58 |
63 |
|
super( calculateCurrentUTCtoWallOffsetMinutes(), 0, pYear, pMonth, pDay, 0, 0, 0, 0 ); |
59 |
64 |
|
} |
60 |
65 |
|
|
61 |
|
- |
private UtilDateAdaptor( long pUTC, int pTimeFields ) |
62 |
|
- |
{ |
63 |
|
- |
super( new Date( pUTC ), pTimeFields ); |
64 |
|
- |
} |
65 |
|
- |
|
66 |
66 |
|
public static UtilDateAdaptor fromUtilDateToString( String pDateToString ) |
67 |
67 |
|
{ |
68 |
68 |
|
return (pDateToString != null) ? new UtilDateAdaptor( UtilDateAdaptor.parseUtilDate( pDateToString ), 4 ) : null; |
|
@@ -133,7 +133,7 @@ |
133 |
133 |
|
int zMin = mMin; |
134 |
134 |
|
if ( mUTCtoWallOffsetMinutes != 0 ) // then Adjust the time to UTC |
135 |
135 |
|
{ |
136 |
|
- |
zMin -= mUTCtoWallOffsetMinutes; // subtract the offset to to advance those to the west, and retard those to the east. |
|
136 |
+ |
zMin -= mUTCtoWallOffsetMinutes; // subtract the offset: to advance those to the west, and retard those to the east. |
137 |
137 |
|
while ( zMin < 0 ) |
138 |
138 |
|
{ |
139 |
139 |
|
zMin += 60; |