Hi Helmut,

I've never used the TimSetSeconds function, but you might try something
like this:

     TimSecondsToDateTime( TimGetSeconds(), &dtPalm))

This will put the current time into your DateTimeType structure.  Maybe
looking at this structure will tell you what going wrong.

Also, this function sends a sysNotifyTimeChangeEvent if the Notification
Manager feature is present.  Maybe another app isn't handling this.

HTH,

Ed


                                                                                       
                        
                    "Helmut Giritzer"                                                  
                        
                    <[EMAIL PROTECTED]>                       To:     "Palm Developer 
Forum"                    
                    Sent by:                                 
<[EMAIL PROTECTED]>                  
                    bounce-palm-dev-forum-23461@news.        cc:                       
                        
                    palmos.com                               Subject:     Re: 
TimSetSeconds doesn't work       
                                                                                       
                        
                                                                                       
                        
                    06/06/01 09:19 AM                                                  
                        
                    Please respond to "Palm Developer                                  
                        
                    Forum"                                                             
                        
                                                                                       
                        
                                                                                       
                        




Hi Dave,

I have just tried what you suggested, but if I use "dtPalm.year = 97", the
resulting seconds-value can't be converted backwards to the original value
(is wrong) and the same error appears (Fatal alert).
Any other ideas, please?

Helmut

Dave Lippincott <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
[EMAIL PROTECTED]
>
> Palm seconds are offset from 1/1/1904 and work up to somewhere around
2034
> so your year may be too large...
>
> > dtPalm.year = 2001;
> which works out to: 2001 + 1904 = 3905
> try
> dtPalm.year = 2001 - 1904 (or 97)
>
> ----- Original Message -----
> From: "Helmut Giritzer" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 06, 2001 5:35 AM
> Subject: TimSetSeconds doesn't work
>
>
> > I have a problem setting the time with TimSetSeconds.
> > As soon as the program executes the TimSetSeconds function, there
happens
> a
> > bus error inside another application (POSE says Date Book 3.5). Please
> take
> > a look at the code fragment below.
> > I know that POSE doesn't change the Windows system time, but the
program
> > doesn't work on a real device, too (Fatal alert, Reset necessary).
> >
> > Program runs with sysAppLaunchCmdNormalLaunch.
> > I'm using CW7, POSE 3.1, palmos35-en-ez.rom (Palm Vx, 8MB), Symbol SPT
> 1700.
> >
> > Thanks for your help.
> > Helmut Giritzer
> >
> >
> > UInt32 ulSecs;
> > DateTimeType dtPalm;
> >
> > dtPalm.year = 2001;
> > dtPalm.month = 6;
> > dtPalm.day = 5;
> > dtPalm.hour = 10;
> > dtPalm.minute = 11;
> > dtPalm.second = 12;
> > dtPalm.weekDay = 0; // don't know, set to 0
> >
> > ulSecs = TimDateTimeToSeconds( &dtPalm );
> > TimSetSeconds( ulSecs );
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> >
>
>
>
>



--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to