projects
/
u
/
mdw
/
putty
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
First crack at `terminal-modes' in SSH. PuTTY now sends ERASE by default,
[u/mdw/putty]
/
windows
/
wintime.c
1
#include
"putty.h"
2
#include <time.h>
3
4
struct
tm
ltime
(
void
)
5
{
6
SYSTEMTIME st
;
7
struct
tm tm
;
8
9
GetLocalTime
(&
st
);
10
tm
.
tm_sec
=
st
.
wSecond
;
11
tm
.
tm_min
=
st
.
wMinute
;
12
tm
.
tm_hour
=
st
.
wHour
;
13
tm
.
tm_mday
=
st
.
wDay
;
14
tm
.
tm_mon
=
st
.
wMonth
-
1
;
15
tm
.
tm_year
=(
st
.
wYear
>=
1900
?st
.
wYear
-
1900
:
0
);
16
tm
.
tm_wday
=
st
.
wDayOfWeek
;
17
tm
.
tm_yday
=-
1
;
/* GetLocalTime doesn't tell us */
18
tm
.
tm_isdst
=
0
;
/* GetLocalTime doesn't tell us */
19
return
tm
;
20
}