Skip to content

Commit

Permalink
设置+8时区,避免因为时区问题导致预约时间不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
shangdezhong authored and oddfar committed Jan 15, 2024
1 parent 4c3848a commit 5641993
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.time.ZoneOffset;
import java.util.TimeZone;

/**
* GitHub: https://github.com/oddfar/campus-imaotai
* @author oddfar
Expand All @@ -11,6 +14,8 @@
public class CampusApplication {

public static void main(String[] args) {
//设置+8时区,避免因为时区问题导致预约时间不正确
TimeZone.setDefault(TimeZone.getTimeZone(ZoneOffset.of("+8")));
SpringApplication.run(CampusApplication.class, args);
}

Expand Down

0 comments on commit 5641993

Please sign in to comment.