lighttpd forum lighty > [HELP] PHP 2 VB.net conversion of sprintf used in mod_secdow

Posted by paperinik2k (Guest)
on 08.09.2008 08:15
Can you help me to convert this in ASP.NET 2.0 VB.NET?

  # current timestamp
  $t = time();

  $t_hex = sprintf("%08x", $t);

I tried many things but cannot have the same result.

This is what I have done so far:

  Dim t As Long = Now.Ticks
  Dim t_int As Int64 = CType(t, Int64)

  Dim t_hex As String = Left(String.Format("{0:x}", t), 8)

Doc page: http://trac.lighttpd.net/trac/wiki/Docs:ModSecDownload

Thanks