FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/src/date.cpp at master · Dmdv/expresscpp · GitHub
Dmdv
/
expresscpp
Public
forked from
expresscpp/expresscpp
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
src
/
date.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (14 loc) · 449 Bytes
Breadcrumbs
expresscpp
/
src
/
date.cpp
Copy path
File metadata and controls
18 lines (14 loc) · 449 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
include
"
expresscpp/date.hpp
"
#
include
<
chrono
>
#
include
<
iomanip
>
#
include
<
sstream
>
namespace
expresscpp
{
std::string
Date::getTime
() {
const
auto
timestamp_ =
std::chrono::system_clock::now
();
const
time_t
now_time =
std::chrono::system_clock::to_time_t
(timestamp_);
const
auto
gmt_time =
gmtime
(&now_time);
std::stringstream ss;
ss <<
std::put_time
(gmt_time,
"
%Y-%m-%d %H:%M:%S
"
);
return
ss.
str
();
}
}
//
namespace expresscpp
Back
|
FazBrowse Home
|
New Git URL