mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
picoev,net.http: use Time.http_header_string method, to improve performance (#22619)
This commit is contained in:
parent
b2ac2ed627
commit
4e13ddf847
2 changed files with 2 additions and 6 deletions
|
@ -410,10 +410,7 @@ fn update_date_string(mut pv Picoev) {
|
|||
for {
|
||||
// get GMT (UTC) time for the HTTP Date header
|
||||
gmt := time.utc()
|
||||
mut date_string := gmt.strftime('---, %d --- %Y %H:%M:%S GMT')
|
||||
date_string = date_string.replace_once('---', gmt.weekday_str())
|
||||
date_string = date_string.replace_once('---', gmt.smonth())
|
||||
pv.date = date_string
|
||||
pv.date = gmt.http_header_string()
|
||||
time.sleep(time.second)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue