How do I explain to Influx to store it at Spain timezone? I imagine that if I don’t indicate where the timezone is from, it will store it as UTC, so it will be wrong for what I need
I simply think that’s not possible (at least directly).
Telegraf\InfluxDB will use UTC for any autogenerated or interpreted timestamp.
If your values have an offset that’s not written\reported in the value itself then the timezone info is simply not present and can’t be used by Telegraf\InfluxDB.
I see the following options:
Generate the data with UTC timestamp or Timezone info
pre-Process your file to “fix” the timestamps
if you are using Telegraf you can use the Exec plugin to run a script that: reads the file, fixes the timestamps, and writes the data
Your SQL Database should be able to convert DateTime into UTC directly (so you won’t even have to deal with offset), the other option is to CAST or CONVERT your timestamp to a DateTime format with timezone which may look like this 2015-10-25 02:00:00 +02:00, how to do that is database dependant.
If you decide to use DateTime with timezone the format string in your header must be changed accordingly