title: How can I create a NLog Config Timeshift by hours in C#?
body: <p>How can I, if possible, create a log file with a timestamp that is shifted by x hours?</p>
  <pre><code>&lt;variable name=&quot;logdt&quot; value=&quot;${shortdate}&quot;/&gt;
  &lt;targets&gt;
      &lt;target
          name=&quot;file&quot; xsi:type=&quot;File&quot;
          layout=&quot;${shortdate}${semi}${time}${semi}${message}&quot;
          fileName=&quot;${basedir}\logs\${logdt}**-6h**.csv&quot; 
          archiveFileName=&quot;${basedir}\archives\${logdt}**-6h**.{#}.zip&quot;
          archiveEvery=&quot;Day&quot;
          archiveNumbering=&quot;Rolling&quot;
          maxArchiveFiles=&quot;7&quot;
          enableArchiveFileCompression=&quot;true&quot;
          keepFileOpen=&quot;true&quot;
          openFileCacheTimeout=&quot;30&quot;
      /&gt;
  &lt;/targets&gt;
  </code></pre>