flat assembler
Message board for the users of flat assembler.
Index
> Main > Feature request - time directive |
Author |
|
revolution 02 May 2012, 03:30
Use %t
Code: current_time = %t |
|||
02 May 2012, 03:30 |
|
smiddy 02 May 2012, 04:12
What is the format of %t? Seconds since January 1, 1970, 12:00 pm GMT? in 32 bits or more?
|
|||
02 May 2012, 04:12 |
|
revolution 02 May 2012, 05:36
There are already plenty of threads here relating to time conversions.
This is a good one to start with: http://board.flatassembler.net/topic.php?t=1139 smiddy: Here is one you already participated in so you should already know: http://board.flatassembler.net/topic.php?t=14096 typedef: You already knew about %t: http://board.flatassembler.net/topic.php?t=12996 Read the entire thread(s). Don't simply read the first post. Various bugs were fixed later etc. |
|||
02 May 2012, 05:36 |
|
typedef 02 May 2012, 05:37
revolution wrote: Use %t How can I use the display macro to display %t as a string. |
|||
02 May 2012, 05:37 |
|
revolution 02 May 2012, 05:43
typedef wrote: How can I use the display macro to display %t as a string. |
|||
02 May 2012, 05:43 |
|
typedef 02 May 2012, 05:54
Damn, I think he(revolution) keeps track of posts we all make. I better start watching my mouth here...err....typing.
BTW: Thanks |
|||
02 May 2012, 05:54 |
|
smiddy 02 May 2012, 10:21
I reread through those posts and it still doesn't answer my questions specifically. Since I never used %t because it can not pull file information, particularly date and time, I have not used it. I see it is in seconds, but from what epoch, and is it specifically 32 bits or can/could it be 64 bits?
Is this correct: baldr wrote: All timestamps are UTC (GMT±0) |
|||
02 May 2012, 10:21 |
|
revolution 02 May 2012, 10:41
When all else fails, read the source:
SOURCE\LINUX\SYSTEM.INC wrote:
|
|||
02 May 2012, 10:41 |
|
Tomasz Grysztar 02 May 2012, 10:44
It is the same as Unix time. It currently fits in 31 bits, it will occupy 32 bits no sooner than in 2038, and 33 after another 68 years, etc.
Numbers in fasm have no defined bit length, the language design treats them as if they were 2-adic numbers (infinite length). |
|||
02 May 2012, 10:44 |
|
smiddy 02 May 2012, 11:49
Thanks for the clarification folks!
|
|||
02 May 2012, 11:49 |
|
rugxulo 02 May 2012, 21:10
Does Linux (properly) support times before 1970??? ("touch -d 19130705 giddy" seems to work, surprisingly.)
DJGPP 2.04's time_t seems to be "unsigned int" (32-bits). Lucid Puppy Linux 5.28's 32-bit headers say "long int" (32-bits). And the relevant portion from the link posted above says this: Quote:
Though I assume that could?? change depending on which POSIX (2001? 2004? 2008) you support. And it seems that RFC1952 (Gzip) only supports unsigned (1970-present) anyways. Fun fun fun. |
|||
02 May 2012, 21:10 |
|
edfed 02 May 2012, 22:06
Code: .compiletime dq %t cool!!!! now i have a goal, do the gregorian conversions routines to convert from this %t to some time structure, and vice versa. in order to display dates, and handle the more friendly. and then, deal with the 29th february support difficulties.... |
|||
02 May 2012, 22:06 |
|
smiddy 02 May 2012, 23:29
rugxulo wrote: Does Linux (properly) support times before 1970??? ("touch -d 19130705 giddy" seems to work, surprisingly.) Great point, which I was so far removed from in "trying to point out" in only knowing the origin, since...dare I say, time is <cough> relative. |
|||
02 May 2012, 23:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.