Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rym-util
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengqiuyun
rym-util
Commits
0b0d5b22
Commit
0b0d5b22
authored
Nov 28, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常调整
parent
ec438a3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
DateUtil.go
util/DateUtil.go
+6
-2
No files found.
util/DateUtil.go
View file @
0b0d5b22
package
util
import
(
"fmt"
"git.168cad.top/zhengqiuyun/rym-util/exception"
"math"
"time"
)
...
...
@@ -28,12 +30,14 @@ func FormatDateMillTime(dateTime time.Time) string {
}
func
ParseDateStart
(
date
string
)
time
.
Time
{
stamp
,
_
:=
time
.
ParseInLocation
(
formatSimple1
,
date
+
" 00:00:00"
,
time
.
Local
)
stamp
,
err
:=
time
.
ParseInLocation
(
formatSimple1
,
date
+
" 00:00:00"
,
time
.
Local
)
exception
.
AssertThrowable
(
err
!=
nil
,
"SYSTEM_ERR.TIME_INVALID"
,
fmt
.
Sprintf
(
"[%s]时间格式错误"
,
date
))
return
stamp
}
func
ParseDateTime
(
dateTime
string
)
time
.
Time
{
stamp
,
_
:=
time
.
ParseInLocation
(
formatSimple1
,
dateTime
,
time
.
Local
)
stamp
,
err
:=
time
.
ParseInLocation
(
formatSimple1
,
dateTime
,
time
.
Local
)
exception
.
AssertThrowable
(
err
!=
nil
,
"SYSTEM_ERR.TIME_INVALID"
,
fmt
.
Sprintf
(
"[%s]时间格式错误"
,
dateTime
))
return
stamp
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment