Exports are saved with wrong date?

This section covers the Meteobridge PRO units exclusively

Moderator: Mattk

Post Reply
svampen
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Fri Aug 16, 2019 10:57 am
Location: Sweden
Contact:

Exports are saved with wrong date?

Post by svampen » Fri Aug 16, 2019 11:21 am

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?? :?:
Attachments
IMG_2348 (kopia).jpg
IMG_2348 (kopia).jpg (62.54 KiB) Viewed 197 times
IMG_2349 (kopia).jpg
IMG_2349 (kopia).jpg (43.2 KiB) Viewed 197 times

Mattk
Platinum Boarder
Platinum Boarder
Posts: 752
Joined: Mon Sep 22, 2014 3:24 am

Re: Exports are saved with wrong date?

Post by Mattk » Fri Aug 16, 2019 12:23 pm

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?

svampen
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Fri Aug 16, 2019 10:57 am
Location: Sweden
Contact:

Re: Exports are saved with wrong date?

Post by svampen » Fri Aug 16, 2019 4:52 pm

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.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5894
Joined: Mon Oct 01, 2007 10:51 pm

Re: Exports are saved with wrong date?

Post by admin » Sat Aug 17, 2019 11:00 am

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

Mattk
Platinum Boarder
Platinum Boarder
Posts: 752
Joined: Mon Sep 22, 2014 3:24 am

Re: Exports are saved with wrong date?

Post by Mattk » Sat Aug 17, 2019 12:42 pm

@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

svampen
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Fri Aug 16, 2019 10:57 am
Location: Sweden
Contact:

Re: Exports are saved with wrong date?

Post by svampen » Sun Aug 18, 2019 10:40 am

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).
Attachments
Skärmavbild 2019-08-18 kl. 10.28.44 (kopia).jpg
Skärmavbild 2019-08-18 kl. 10.28.44 (kopia).jpg (81.33 KiB) Viewed 142 times
Skärmavbild 2019-08-18 kl. 10.30.46 (kopia).jpg
Skärmavbild 2019-08-18 kl. 10.30.46 (kopia).jpg (32.28 KiB) Viewed 142 times

Post Reply