From f5af673e567bb6921f9c08aa50481a34972bbb6a Mon Sep 17 00:00:00 2001 From: Dan Cojocaru Date: Wed, 24 Jun 2026 04:55:30 +0200 Subject: [PATCH] Add (potentially useless) DTS change --- scraper/src/Utils/DateTimeSequencer.cs | 53 ++++++++++++++------------ 1 file changed, 28 insertions(+), 25 deletions(-) mode change 100644 => 100755 scraper/src/Utils/DateTimeSequencer.cs diff --git a/scraper/src/Utils/DateTimeSequencer.cs b/scraper/src/Utils/DateTimeSequencer.cs old mode 100644 new mode 100755 index fd55eb7..22cb102 --- a/scraper/src/Utils/DateTimeSequencer.cs +++ b/scraper/src/Utils/DateTimeSequencer.cs @@ -1,25 +1,28 @@ -using System; - -namespace InfoferScraper { - public static partial class Utils { - public class DateTimeSequencer { - private DateTime _current; - - public DateTimeSequencer(int year, int month, int day) { - _current = new DateTime(year, month, day); - _current = _current.AddSeconds(-1); - } - - public DateTimeSequencer(DateTime startingDateTime) { - _current = startingDateTime.AddSeconds(-1); - } - - public DateTime Next(int hour, int minute = 0, int second = 0) { - DateTime potentialNewDate = new(_current.Year, _current.Month, _current.Day, hour, minute, second); - if (_current > potentialNewDate) potentialNewDate = potentialNewDate.AddDays(1); - _current = potentialNewDate; - return _current; - } - } - } -} +using System; + +namespace InfoferScraper { + public static partial class Utils { + public class DateTimeSequencer { + private DateTime _current; + + public DateTimeSequencer(int year, int month, int day) { + _current = new DateTime(year, month, day); + _current = _current.AddSeconds(-1); + } + + public DateTimeSequencer(DateTime startingDateTime) { + _current = startingDateTime.AddSeconds(-1); + } + + public DateTime Next(int hour, int minute = 0, int second = 0) { + DateTime potentialNewDate = new(_current.Year, _current.Month, _current.Day, hour, minute, second); + if (_current >= potentialNewDate) { + _current = potentialNewDate.AddDays(1); + potentialNewDate = new(_current.Year, _current.Month, _current.Day, hour, minute, second); + } + _current = potentialNewDate; + return _current; + } + } + } +}