-3

In mongodb, I know there are query operations which could be used on datetime object like : $hour, $dayOfWeek etc.

But I've not found any manual about timezone settings, similar with what could be done in mysql like:

SET time_zone = '-8:00';

So, is there anyway to do similar things in mongodb?

Neil Lunn
  • 148,042
  • 36
  • 346
  • 317
Jack
  • 619
  • 2
  • 9
  • 18
  • 1
    Please don't post duplicates: http://stackoverflow.com/questions/14496489/how-to-do-query-with-timezone-settings-in-mongodb finish one version of the question at a time – Sammaye Jan 24 '13 at 13:20

1 Answers1

-1

use this attribute

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime Date { get; set; }
Ozan BAYRAM
  • 2,780
  • 1
  • 28
  • 35