0

This is similar to this question, hence the title.

Date output is different on the server even though the cultures are the same. Both dev machine and server has the same datae format set in Windows; English (United States). I have modified the the date format for ShortDateString to 'yyyy-MM-dd'. This change only take effect on the dev machine, the server is still displays values in original en-US format.

On the dev machine all i have to do is restart IIS to pick up any changes in date format. The server however is very reluctant and stubborn.

Here is some output from both machines:

On my windows 7 dev machine:

Current Culture: en-US
Current UI Culture: sv-SE

Short date format: yyyy-MM-dd
Long date format: 'den 'd MMMM yyyy
UI short date format: yyyy-MM-dd
UI long date format: 'den 'd MMMM yyyy

Decimal number: 1234.5
DateTime.Now: 2013-02-21 19:08:47
DateTime.Now.ToShortDateString() : 2013-02-21

On the Windows 2008 R2 server:

Current Culture: en-US
Current UI Culture: sv-SE

Short date format: yyyy-MM-dd
Long date format: 'den 'd MMMM yyyy
UI short date format: yyyy-MM-dd
UI long date format: 'den 'd MMMM yyyy

Decimal number: 1234.5
DateTime.Now: 2/21/2013 7:08:49 PM
DateTime.Now.ToShortDateString() : 2/21/2013

All settings under Region and Language are identical. Any ideas?

UPDATE Updated the question with more info

Community
  • 1
  • 1
Malako
  • 534
  • 6
  • 20

1 Answers1

0

maybe because on your server IIS runs on an other account (not your own), and the will ignore your local setting... could explain the problem?

stefano m
  • 4,094
  • 5
  • 28
  • 27