Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appbase-edge-function
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
duanjinfei
appbase-edge-function
Commits
e75ff1a0
Commit
e75ff1a0
authored
Nov 27, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix function
parent
b7d9c775
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
index.ts
supabase/functions/update-app/index.ts
+5
-8
No files found.
supabase/functions/update-app/index.ts
View file @
e75ff1a0
...
...
@@ -38,15 +38,12 @@ const getTimestampForMidnight3AM = () => {
// 获取当前时间
const
now
=
new
Date
();
//
将当前时间转换为东八区时间
const
utc8Time
=
new
Date
(
now
.
toLocaleString
(
"
en-US
"
,
{
timeZone
:
"
Asia/Shanghai
"
})
);
//
设置为当天凌晨3点
const
threeAM
=
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
now
.
getDate
(),
3
,
0
,
0
);
// 设置时间为东八区凌晨3点
utc8Time
.
setHours
(
3
,
0
,
0
,
0
);
// 返回东八区凌晨三点的时间戳(单位:秒)
return
Math
.
floor
(
utc8Time
.
getTime
()
/
1000
);
}
// 返回时间戳(单位:秒)
return
Math
.
floor
(
threeAM
.
getTime
()
/
1000
);
};
Deno
.
serve
(
async
(
req
)
=>
{
if
(
req
.
method
===
'
OPTIONS
'
)
{
...
...
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