[Gambas-user] Date(Now) with time component under Ubuntu?

Bruce adamnt42 at gmail.com
Thu Dec 6 12:51:36 CET 2018


Rolf,
This is really good.
When is Now()? Is it the UTC now, or the local now?
Forget the Date() bit.
b

On 6/12/18 9:52 pm, Rolf-Werner Eilert wrote:
> Hi Benoit,
> 
> This is contradictional:
> 
>> Date(Now) -> Return the date part, in the current localization (i.e. 
>> the current timezone). It means that the time part is set to 00:00:00, 
>> but in the current timezone.
> 
> The help says:
> 
> Date
> 
> Result = Date ( [ Expression ] )
> 
> Return the date part of a date & time expression. If the expression is 
> omitted, then the today date is returned.
> 
> The current localization is used, i.e. the date part in the current 
> timezone is returned.
> 
> Example
> 
> Print Now; " -> "; Date(Now)
> 
> 05/16/2002 15:10:59 -> 05/16/2002
> 
> 
> But what I get back is something like
> 
> 05/16/2002 00:00:00
> 
> This should either not be the case, or be corrected in the help. The 
> Day, Month, Year components are delivered correctly of course, as they 
> are only integers.
> 
> Everything else works like you described, i. e. I have to look for 
> unclear string conversions etc.
> 
> 
> 
> Regards
> Rolf
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----


More information about the User mailing list