Skip to content

Commit 9e95fec

Browse files
author
Vinh Nguyen
committed
add recipe
1 parent 5b00f2a commit 9e95fec

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/basics/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ Back to [Main](../../README.md)
77
## Lang
88

99
- [String](lang/String.md)
10+
11+
## Time
12+
13+
- [OffsetDateTime](time/OffsetDateTime.md)

docs/basics/time/OffsetDateTime.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# OffsetDateTime
2+
3+
## Convert to Millis
4+
5+
Use `Instant` to get epoch milliseconds.
6+
7+
```java
8+
OffsetDateTime hostTimestamp;
9+
10+
hostTimestamp.toInstant().toEpochMilli();
11+
```

0 commit comments

Comments
 (0)