Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-13 22:03:09 +00:00

nfqws2: time convert functions

This commit is contained in:
bol-van
2026-02-05 14:32:36 +03:00
parent 3334786fe3
commit 64c1f96f80
5 changed files with 178 additions and 4 deletions

View File

@@ -76,6 +76,7 @@
- [clock\_gettime](#clock_gettime)
- [getpid](#getpid)
- [stat](#stat)
- [time](#time)
- [Packet handling options](#packet-handling-options)
- [standard reconstruct](#standard-reconstruct)
- [standard rawsend](#standard-rawsend)
@@ -1993,6 +1994,34 @@ If successful returns the following table :
In case of error returns 3 values : nil, error string, error number (errno).
#### time
```
function localtime(unixtime)
function gmtime(unixtime)
function timelocal(tm)
function timegm(tm)
```
localtime and gmtime return dissected unixtime similar to C "struct tm". timelocal and timegm are reverse functions.
| Поле | Тип | Описание |
| :------- | :----- | :---------- |
| sec* | number | second |
| min* | number | minute |
| hour* | number | hour |
| mon* | number | month starting from 0 |
| mday* | number | day of month starting from 1 |
| year* | number | full year, not from 1900 |
| wday | number | day of week. 0 = sunday |
| yday | number | day of year starting from 0 |
| isdst* | number | not zero if summer time in effect |
| zone | string | time zone |
| str | number | formatted string: "dd.mm.yyyy hh:mi:ss" |
Fields marked with "*" are required for reverse translation.
### Packet handling options
The following functions use standard sets of options: `rawsend` and `reconstruct`.