I am getting a variable with Gregorian seconds and would like to use it in Java. Is there a library function in Java <=8, JodaTime, Apache commons, guava or anything else, where this is implemented?
I know I can convert the gregorian seconds to epoch timestamp by multiplying by 1000 and then subtracting 62167219200000 but I'd prefer not to hardcode it if there already is an implementation. I haven't found any so far.
[edit: this is not a duplicate of the linked question, there's no xml dateTime used here, the answer in linked question does not answer this one]