If the custom format has no year component specified, Promtail will assume that the current year according to the system’s clock should be used.
given this line of log
Dec 31 23:59:59 node-1 systemd[1]: Started Session 189640 of User ubuntu.
if the above line of log is scrapped at at 2023-01-01 00:00:09, will the timestamp become 2023-12-31 23:59:59 since promtail use the current year or 2022-12-31 23:59:59 since the current time is less than 2023-12-31 23:59:59
sadly it will use the current year even though the current time has not reach the generated date & time.
Is this a one time thing or are you concerned about log files at end of year only?
My concern is the log files at end of year, because if it gets parsed the current way and sent to loki, i will not be able to ship 1 whole year of log on the next year since it will be counted as out-of-order