Skip to content

Commit ee69d26

Browse files
committed
Time zone improved
1 parent 6ee36cf commit ee69d26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/olegshan/parser/Parser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private LocalDateTime getDateForRabotaUa(String url) {
180180
dateLine = dateDoc.getElementsByAttributeValue("itemprop", "datePosted").text();
181181
if (dateLine.length() == 0) {
182182
//no date at all, sometimes it happens
183-
LocalDateTime ldt = LocalDateTime.now(ZoneId.of("GMT+3"));
183+
LocalDateTime ldt = LocalDateTime.now(ZoneId.of("Europe/Athens"));
184184
LOGGER.info("There was no date on Rabota.ua, return {}", ldt);
185185
return ldt;
186186
}
@@ -206,7 +206,7 @@ private LocalDateTime getDateForRabotaUa(String url) {
206206
}
207207

208208
private LocalTime getTime() {
209-
return LocalTime.now(ZoneId.of("GMT+3"));
209+
return LocalTime.now(ZoneId.of("Europe/Athens"));
210210
}
211211

212212
private String getCompany(JobSite jobSite, Element job, String url, String[] companyData) {

src/main/java/com/olegshan/parser/Performer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class Performer {
2222
@Autowired
2323
private HeadHunterUa headHunterUa;
2424

25-
@Scheduled(cron = "0 0 7-23 * * *")
25+
@Scheduled(cron = "0 0 7-23 * * *", zone = "Europe/Athens")
2626
public void perform() {
2727
douUa.parse();
2828
headHunterUa.parse();

0 commit comments

Comments
 (0)