The Trunk: KernelTests-dtl.227.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-dtl.227.mcz

commits-2
David T. Lewis uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-dtl.227.mcz

==================== Summary ====================

Name: KernelTests-dtl.227
Author: dtl
Time: 9 July 2012, 10:36:20.756 pm
UUID: 24287063-d5f2-4af5-ba04-c23fb2c4f5c5
Ancestors: KernelTests-nice.226

Patch by JohnReed Maffeo for Mantis 7693: DateAndTime readFrom: does not recognize $Z as a valid timezone designator.

http://bugs.squeak.org/view.php?id=7693

Change Set: DateAndTime
Date: 9 July 2012
Author: jrm

Method readFrom: in Class DateAndTime modified to interpret $Z as a valid time zone designator. Associated test modified to verify the new behavior.

=============== Diff against KernelTests-nice.226 ===============

Item was changed:
  ----- Method: DateAndTimeTest>>testFromString (in category 'Tests') -----
  testFromString
 
+ | fromString fromStringNoOffset fromStringUTC |
- | fromString fromStringNoOffset |
  fromString := DateAndTime fromString: '-1199-01-05T20:33:14.321-05:00'.
  self assert: (fromString printString = '-1199-01-05T20:33:14.321-05:00').
 
  "if no offset is provided, the local offset should be used"
  fromStringNoOffset := DateAndTime fromString: '-1199-01-05T20:33:14.321'.
+ self assert: (fromStringNoOffset offset = DateAndTime localOffset).
+
+ "if a string contains the UTC designator Z, the local offset should not be used"
+ fromStringUTC := DateAndTime fromString: '2011-08-26T18:00:03Z'.
+ self assert: (fromStringUTC printString = '2011-08-26T18:00:03+00:00').!
- self assert: (fromStringNoOffset offset = DateAndTime localOffset).!