1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 22:52:29 +08:00

feat: add timezone support for FormatTimeToStr and FormatStrToTime

This commit is contained in:
dudaodong
2023-07-26 14:40:12 +08:00
parent a0431d9435
commit 31e8b12674
4 changed files with 34 additions and 11 deletions

View File

@@ -838,7 +838,7 @@ func main() {
<b>Signature:</b>
```go
func FormatTimeToStr(t time.Time, format string) string
func FormatTimeToStr(t time.Time, format string, timezone ...string) string
```
<b>Example:</b>
@@ -877,7 +877,7 @@ func main() {
<b>Signature:</b>
```go
func FormatStrToTime(str, format string) (time.Time, error)
func FormatStrToTime(str, format string, timezone ...string) (time.Time, error)
```
<b>Example:</b>