Issue 304 in glassdb: printString from DateAndTime created with ScaledDecimal contains unnecessary dot

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

Issue 304 in glassdb: printString from DateAndTime created with ScaledDecimal contains unnecessary dot

glassdb
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium GLASS-Server Version-GLASS0.231

New issue 304 by norbert.hartl: printString from DateAndTime created with  
ScaledDecimal  contains unnecessary dot
http://code.google.com/p/glassdb/issues/detail?id=304

I'm using DateAndTime and the way I use it leads to the internal creation  
of a ScaledDecimal representation. Using the printString produces a ISO8601  
format.
The format is problematic if the ScaledDecimals denominator is 1 (if the  
number is integer). In this case there is a leading dot left after the  
seconds

  (DateAndTime year: 2011 month: 10 day: 31 hour: 14 minute: 23 second:  
(ScaledDecimal fromString: '47.0') offset: Duration zero) printString

will give

'2011-10-31T14:23:47.+00:00'

DateAndTime can also be represented by a SmallDouble but there the problem  
does not exist. I'll attach a fix in a few minutes to this issue

Reply | Threaded
Open this post in threaded view
|

Re: Issue 304 in glassdb: printString from DateAndTime created with ScaledDecimal contains unnecessary dot

glassdb

Comment #1 on issue 304 by norbert.hartl: printString from DateAndTime  
created with ScaledDecimal  contains unnecessary dot
http://code.google.com/p/glassdb/issues/detail?id=304

Fix is published in

Name: Squeak-NorbertHartl.276
Author: NorbertHartl
Time: 10/31/2011, 15:29:30
UUID: 83f8090e-86b8-4b43-ba68-502e70f8f45e
Ancestors: Squeak-dkh.275

Fix for issue #304 "printString from DateAndTime created with ScaledDecimal  
contains unnecessary dot". Fixes the string representation of ScaledDecial  
based DateAndTime objects if denominator becomes 1.
Added a test that covers scaled decimal and small double for this edge case

Reply | Threaded
Open this post in threaded view
|

Re: Issue 304 in glassdb: printString from DateAndTime created with ScaledDecimal contains unnecessary dot

glassdb
Updates:
        Status: Fixed
        Owner: [hidden email]
        Labels: Fixed-1.0-beta.8.7.1

Comment #2 on issue 304 by [hidden email]: printString from  
DateAndTime created with ScaledDecimal  contains unnecessary dot
http://code.google.com/p/glassdb/issues/detail?id=304

Integrated fix into GsCore 0.245.1 for GLASS 1.0-beta.8.7.1