Page 1 of 1

Exports are saved with wrong date?

Posted: Fri Aug 16, 2019 11:21 am
by svampen
Hello all!
Got the Meteobridge NanoSD some month ago and it is up and running well.

Apart from my monthly and daily reports that are generated every night. I save them to my server with a datecode such as:
Montlyreport_[YYYY]-[MM].txt <-- The monthly report, resolution per day
Dailyreport_[YYYY]-[MM]-[DD].csv <-- Daily report, resolution per minute

One entry on the system tab generates the export, and one that is triggered by that event uploads with ftp.
If I run this using the "test" button it works out fine. But when run triggered the last datecode - month for the monthlyreport and day for the dailyreport is set to 01, so I get no daily reports saved since it is overwriting itself. The montly overwrites january every night.
Again, if run with the test-button it works as it I guess it is suppose to.

I did try to remove all entrys, reboot and add them again but without success.
Running Meteobridge 4.0 (Aug 11 2019, build 2251), FW 1.4

Attach screendump for the dailyreport settings and the outcome.

Any ideas what this might be?? :?:

Re: Exports are saved with wrong date?

Posted: Fri Aug 16, 2019 12:23 pm
by Mattk
Have encountered much the same thing with the file tag not matching the first record of the export file in conjunction with the event trigger? What I have done is drop the trigger event, export: before each new day, Time frame: Current Day then FTP export at 00:15 for lastexport which is fine if there is no in-between exports etc

This does appear something specific to the NanoSD and not the MBPro but not sure why there should be any difference?

Re: Exports are saved with wrong date?

Posted: Fri Aug 16, 2019 4:52 pm
by svampen
Thank you for confirming my suspisions, Mattk.

I have now setup times to match your setup aka. suggestion. See if that will make any difference, but I agree the behaviour is a little strange.

Re: Exports are saved with wrong date?

Posted: Sat Aug 17, 2019 11:00 am
by admin
Date information used to build the upload filename is taken from the name of the generated export file. Can you please unmark delete and check if the name of the file generated is in the expected format?

Instead of using the [YYYY][MM][DD] logic you can also use a "strftime" syntax within the filename which makes use of the current time when the event is triggered. Details about the variables to be used can be found here: http://man7.org/linux/man-pages/man3/strftime.3.html

[YYYY]-[MM]-[DD] will look like: %Y-%m-%d

Re: Exports are saved with wrong date?

Posted: Sat Aug 17, 2019 12:42 pm
by Mattk
@svampen link to a previous post which I believe is the same as what you are finding?

viewtopic.php?f=56&t=14243&p=29700&hili ... ame#p29700

Re: Exports are saved with wrong date?

Posted: Sun Aug 18, 2019 10:40 am
by svampen
Thanks for helping me, guys! :)

I tried to revert to a triggered event for ftp and unchecked the delete-box. The generated file in the export folder is ok with datecode 201908 (I have also tried different names on the template, but without any difference). But when it uploads it translates to 2019-01. I guess the screenshots tell it all.

If I use the strftime it works correctly, so that is a good workaround as long as I keep uploads on the same day as they are valid (i.e. right before midnight).