Midday

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

Midday

Maarten Mostert-2
Hi,

Is it normal that both these print the same way ?

(Time fromSeconds: 12 * 3600) 12:00:00 PM
(Time fromSeconds: 24 * 3600) 12:00:00 PM


Regards,

@+Maarten,
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Midday

Dennis smith-4
Seems to me the issue is not how it displays but what is stored from the
second one.

It stores
     hours = 24
no such thing if this is wall-clock time, it should either give an error
or store hours=0.

I guess it all depends on how you define "Time", should it be able to
store 3 days worth of time?
If so, then something DOES need to be done about the display, you would need
     1 day  10:00
to show 34 hours for example.

Looking at Gemstone, since I happened to be logged in at the time, it
stores 24 as 0, and
wraps if you take say 23 and add 3600 seconds.

On 2014-09-26 3:05 PM, Maarten Mostert wrote:

> Hi,
>
> Is it normal that both these print the same way ?
>
> (Time fromSeconds: 12 * 3600) 12:00:00 PM
> (Time fromSeconds: 24 * 3600) 12:00:00 PM
>
>
> Regards,
>
> @+Maarten,
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Dennis Smith
Cherniak Software Development Corporation
Phone  416.798.7948 ext 314
Email  [hidden email]

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Midday

Maarten Mostert

Yes I know it does store the hours correctly and I use Duration to account for longer things

but still it is confusing that 12:00:00 AM doesn't print.

If I do some more of them ..

 

(Time fromSeconds: 12 * 3600 -1) 11:59:59 AM
(Time fromSeconds: 12 * 3600+1) 12:00:01 PM
(Time fromSeconds: 13 * 3600) 1:00:00 PM
(Time fromSeconds: 17 * 3600) 5:00:00 PM

 

For me there is definitely something wrong between 12 AM and 1 PM.

 

@+Maarten,

 

 

> "Dennis Smith" <[hidden email]> |

> Seems to me the issue is not how it displays but what is stored from the


> second one.
>
> It stores
> hours = 24
> no such thing if this is wall-clock time, it should either give an error
> or store hours=0.
>
> I guess it all depends on how you define "Time", should it be able to
> store 3 days worth of time?
> If so, then something DOES need to be done about the display, you would need
> 1 day 10:00
> to show 34 hours for example.
>
> Looking at Gemstone, since I happened to be logged in at the time, it
> stores 24 as 0, and
> wraps if you take say 23 and add 3600 seconds.
>
> On 2014-09-26 3:05 PM, Maarten Mostert wrote:
> > Hi,
> >
> > Is it normal that both these print the same way ?
> >
> > (Time fromSeconds: 12 * 3600) 12:00:00 PM
> > (Time fromSeconds: 24 * 3600) 12:00:00 PM
> >
> >
> > Regards,
> >
> > @+Maarten,
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
> --
> Dennis Smith
> Cherniak Software Development Corporation
> Phone 416.798.7948 ext 314
> Email [hidden email]
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Midday

Steve Cline
Midday is 12 pm.  Midnight is 12 am.

in VW 7.5, which is what I have at hand at work,

Time fromSeconds: 0  12:00:00 am
(Time fromSeconds: 12 * 3600)  12:00:00 pm
(Time fromSeconds: 24 * 3600) -> subscript out of bounds error

which implies that the intent of the class historically is to only display times that are valid within one 24 hour period, 00:00:00 ( = 12 am) to 11:59:59 pm.

Am I missing something?  Looks like a change after 7.5 allows Time to hold more that 24 hours, which seems to go into undefined territory.  I do have to agree that it seems that once you hit 24 hours, the display should start over at 12 am, but I also think that a Time object should never be asked to hold >= 24 hours.
Reply | Threaded
Open this post in threaded view
|

Re: Midday

Karsten Kusche

Time fromSeconds: 0 12:00:00 am
(Time fromSeconds: 12 * 3600) 12:00:00 pm
(Time fromSeconds: 24 * 3600) -> subscript out of bounds error

that still works in VW 7.10. The problem is probably that totally confusing fact that "11:59 pm + 1minute“ = "12:00 am" and "11:59 am + 1 minute“ = "12:00 pm".

Karsten



 
which implies that the intent of the class historically is to only display
times that are valid within one 24 hour period, 00:00:00 ( = 12 am) to
11:59:59 pm.

Am I missing something? Looks like a change after 7.5 allows Time to hold
more that 24 hours, which seems to go into undefined territory. I do have
to agree that it seems that once you hit 24 hours, the display should start
over at 12 am, but I also think that a Time object should never be asked to
hold >= 24 hours.



--
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
jas
Reply | Threaded
Open this post in threaded view
|

Re: Midday

jas
In reply to this post by Maarten Mostert-2
On 9/26/2014 12:05 PM, Maarten Mostert wrote:
> Hi,
>
> Is it normal that both these print the same way ?

No - good catch - they're both wrong.
There are no such times as:

        12:00:00 AM

        12:00:00 PM

They should be:

(Time fromSeconds: 12 * 3600) 12:00:00 N
(Time fromSeconds: 24 * 3600) 12:00:00 M

Regards,

-cstb

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Midday

Vincent Lesbros-2
Hi,

I get this :

(Time fromSeconds: 0) 00:00:00
(Time fromSeconds: 12 * 3600) 12:00:00
(Time fromSeconds: 24 * 3600) 24:00:00 
(Time fromSeconds: 37 * 3600) 37:00:00

and no error.
VisualWorks® Personal Use Edition, 7.9.1 of 18 octobre 2012



2014-10-22 0:58 GMT+02:00 jas <[hidden email]>:
On 9/26/2014 12:05 PM, Maarten Mostert wrote:
Hi,

Is it normal that both these print the same way ?

No - good catch - they're both wrong.
There are no such times as:

        12:00:00 AM

        12:00:00 PM

They should be:

(Time fromSeconds: 12 * 3600) 12:00:00 N
(Time fromSeconds: 24 * 3600) 12:00:00 M

Regards,

-cstb


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc