DateTime::Format::Duration formats (was Re: DateTime::Set: make test failing on Debian Sarge)

2005-08-18 Thread Rick Measham

Kaare Rasmussen wrote:
I wanted to ask about that module too. It's not possible to format a duration 
so I get hours:minutes? (E.g. 144:22). Seems to me that I can't get hours > 
23 if I normalize.


I'm not happy with the formatting/normalizing in that module at the 
moment, but until DateTime works for non UTC math, don't expect any 
changes :)


I'll probably look at some sort of extended system for the formats:

%h   == hours in the normalised time
%.h  == duration expressed as an integer number of hours
%.2h == duration expressed in hours to two decimal places

So to get the format you want, the format is '%.h:%m'

But as I said, that wont be happening until the date math is working for 
non-UTC zones.


Cheers!
Rick Measham



Re: DateTime::Set: make test failing on Debian Sarge

2005-08-18 Thread Kaare Rasmussen
> This looks like it will be the same problem in the last three or four
> threads in the mailing list: the calucation of datetimes in timezones

Yes, I noticed them too :-)

> Or you can pass any spare tuits you have lying around to Dave .. he's
> looking for some :)

I need all I can get too...

> (BTW: My DateTime::Format::Duration tests also fail with the current
> date math problems in DateTime, so once again you can ignore the failed
> tests so long as you only want UTC durations formatted :))

I wanted to ask about that module too. It's not possible to format a duration 
so I get hours:minutes? (E.g. 144:22). Seems to me that I can't get hours > 
23 if I normalize.



Re: DateTime::Set: make test failing on Debian Sarge

2005-08-16 Thread Rick Measham

Kaare Rasmussen wrote:
I've tried the debian package of datetime and I've tried from CPAN. I've 
also tried to set different TZ values. Does anyone know what the problem 
can be?


This looks like it will be the same problem in the last three or four 
threads in the mailing list: the calucation of datetimes in timezones 
other than UTC. If you only work in UTC, it will probably all work fine. 
You can convert to some other time zone before returning your results.


Or you can pass any spare tuits you have lying around to Dave .. he's 
looking for some :)


(BTW: My DateTime::Format::Duration tests also fail with the current 
date math problems in DateTime, so once again you can ignore the failed 
tests so long as you only want UTC durations formatted :))


Cheers!
Rick Measham