I have C# code that does the following:
DateTime now = DateTime.UtcNow;
string timeToOutput = now.ToString();
String pathInStorage = now.ToString("yyyy-MM-dd/HH/");
CloudBlobClient client = getClient();
CloudBlobContainer container = client.GetContainerReference(hardcodedContainerName);
container.GetBlobReference(pathInStorage).UploadText(timeToOutput);
as you see, I first obtain current time and then format it twice using different format strings. Now most of the time the path in the storage will match the time output into the blob itself.
Yet sometimes (very rarely) time in the blob will be of year 2012 (like 12:33:00 Oct 29 2012), but the path will contain year 2555 and hour-day-month will match those of the time inside the blob (like 2555-10-29-12).
How could this happen?
Year 2555 is 2012 in Thai Solar Calendar. Not sure why are you getting this, perhaps a server executing the code has a Thai locale?
To get the code to run as you expect, use a different, locale-aware version of ToString(). See DateTime.ToString()