Hi,
I’m trying to filter files newer than some other file.
So, I list that file, get his creationtime, after that I calculate the difference between the current time and the creation time of that file. That is the difference in days between today and day when the file is created.
BUT, I work with fucking windows, and, there I got epoch with comma, not dot. And I’m unable to calculate difference. If I try to get int valčue from epoch, calculated value is zero.
For example, this is output of setup module on windows:
“ansible_date_time”: {
“date”: “2018-05-02”,
“day”: “02”,
“epoch”: “1525275022,0416”,
My idea was to calculate before how much day file was created with following formula:
days_since_last_backup: “{{ ((current_epoch|int - item.creationtime|int)/86400)|int }}”
But I got negative value since ansible can’t calculate integer value from some variable which has comma in self.
So, is there some option to replace in variable/string comma with dot.