Skip to content

Commit

Permalink
[O] works in midnight
Browse files Browse the repository at this point in the history
  • Loading branch information
LS-KR committed Dec 19, 2024
1 parent ad3f955 commit b30037c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export default class Profile extends Vue {
const sunset = sunsetTime(now.getFullYear(), now.getMonth() + 1, now.getDate(), 45.0);
const sunrise = sunriseTime(now.getFullYear(), now.getMonth() + 1, now.getDate(), 45.0);
if (now.getTime() > (new Date(now.getFullYear(), now.getMonth(), now.getDate(), sunset.hour, sunset.minute, sunset.second).getTime())) {
if (now.getTime() > (new Date(now.getFullYear(), now.getMonth(), now.getDate(), sunset.hour + 2, sunset.minute, sunset.second).getTime())) {
return {
warningLimit: Math.floor(limit.warningLimit / 2),
errorLimit: Math.floor(limit.errorLimit / 2),
cooldown: limit.cooldown
}
}
else if (now.getTime() < (new Date(now.getFullYear(), now.getMonth(), now.getDate(), sunrise.hour, sunrise.minute, sunrise.second).getTime())) {
else if (now.getTime() < (new Date(now.getFullYear(), now.getMonth(), now.getDate(), Math.floor(sunrise.hour * 0.5 + 2), sunrise.minute, sunrise.second).getTime())) {
return {
warningLimit: Math.floor(limit.warningLimit / 2),
errorLimit: Math.floor(limit.errorLimit / 2),
Expand Down

0 comments on commit b30037c

Please sign in to comment.