PVoutput java script evaluating wrong date

I’m getting some weirdness with the pvoutput java uploader. 4 sites now are showing weirdness. I’m using raspbian bullseye. They seem to be getting 2026 for the date, instead of 2025. some of these have been working for many years now. both pc and pi are showing similar times when uploads stopped.

very odd.

this problem appeared about 2 days ago and i can see in pvoutput.log it’s trying to fetch
26123000.csv instead of
25123000.csv

manually overwriting the template with todays date works…
chatgpt might know more.
I’ll post a fix if I find one.

chatgpt says:
That filename jump from 2526 right at the end of December is the classic Java date-format trap:

  • Y / YY / YYYY in Java formatting = week-based year (ISO week year)
  • y / yy / yyyy = calendar year

So around year-end, dates like 2025-12-29 and 2025-12-30 can belong to week 1 of 2026, and formatting with YY/YYYY will produce 26 even though the calendar date is still in 2025. This is exactly the behavior described in Java’s date/time formatting rules. Stack Overflow+1

What to change

Wherever the uploader (or its config) defines the filename pattern:

  • If you want 2-digit year like 25123000.csv, use: yyMMdd'00' (or yyMMdd00)
  • If you want 4-digit year, use: yyyyMMdd'00'

And avoid YY / YYYY entirely unless you intentionally want ISO week-year.

So your current config like:

  • {YYYYMMDD00}.csv (or {YYMMDD00}.csv)

should become:

  • {yyMMdd00}.csv (for 25123000.csv style), or
  • {yyyyMMdd00}.csv (for 2025123000.csv style)

(Exact brace syntax depends on how that uploader substitutes tokens, but the key fix is uppercase Y → lowercase y.)

I will test the fix!

changed YY to yy and it’s fixed.
the change is in pvoutput.ini in the conf folder.

oopsie!!