mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add utc time format.
This commit is contained in:
parent
56cd373015
commit
e458305f81
8 changed files with 73 additions and 20 deletions
|
@ -274,8 +274,14 @@ bool SrsFastLog::generate_header(bool error, const char* tag, int context_id, co
|
|||
|
||||
// to calendar time
|
||||
struct tm* tm;
|
||||
if ((tm = localtime(&tv.tv_sec)) == NULL) {
|
||||
return false;
|
||||
if (_srs_config->get_utc_time()) {
|
||||
if ((tm = gmtime(&tv.tv_sec)) == NULL) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if ((tm = localtime(&tv.tv_sec)) == NULL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// write log header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue