[futurebasic] Re: [FB] FB clock Again

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2004 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Sat, 3 Jan 2004 01:33:34 +0100
Le 2 janv. 04, à 22:48, Alain Pastor a écrit :

>
> Le 2 janv. 04, à 22:24, Ted Spencer a écrit :
>
>> On Friday, January 2, 2004, at 03:23  PM, Alain Pastor wrote:
>>
>>>>
>>> Further explanation. The behavior of the prog depends on the setting 
>>> of your time format at the system level. The app seems to assume 
>>> that everybody will use the English/US format for the time, i.e. 12 
>>> hours (AM/PM) as opposed to 24 hours that we generally use in 
>>> France.
>>
>> Funny you should mention that, because I wrote it initially at about 
>> 11AM, and found that at 2PM it wouldn't work, and that turned out to 
>> be a problem with extracting the hours from the timestring:
>> CALL GETDATETIME( t& )
>> CALL TIMESTRING( t&, _true, timeStr$ , _nil ) //_false here hides the 
>> seconds
>>
>> Of course, I wrongly assumed that this thing generates some sort of 
>> 'one size fits all' time string, more or less independent of regional 
>> gestalt. Such would appear not to be the case
>>
>> Does such a convenient thing exist?
>>
> If I understand you correctly, the answer is yes: simply use the FB 
> TIME$ function (or maybe another alternative would be to create a 
> reliable itl0 resource on the fly to pass onto the TimeString Toolbox 
> function).
>
>
Actually, I think you could force the use of the 12 hours time format, 
maybe like so:

Dim itl0H As Handle

itl0H = Fn IUGetIntl(0)
If itl0H Then | [itl0H] + _timeCycle, 255
GetDateTime( t&)
TimeString( t&, _true, timeStr$ , itl0H )

Alain