Skip to content

Grumpy.Code.Dude.

Random Code Shenanigans

  • About Me

Month: May 2018

View Users on OSX

From the commandline: –

dscl . list /Users
Author ancientcoderPosted on 9 May 2018Categories Bits, OSXLeave a comment on View Users on OSX

C#: Clamping a datetime to an arbitrary TimeSpan

To clamp a datetime to an arbitrary TimeSpan: –

 delta = a_dateTime.Ticks % TimeSpan.FromHours(1).Ticks;
 a_dateTime = a_dateTime.AddTicks(-delta);

 

 

Author ancientcoderPosted on 7 May 2018Categories Bits, C#Leave a comment on C#: Clamping a datetime to an arbitrary TimeSpan

Recent Posts

  • Flutter Examples Repo
  • Flutter: Displaying debug info
  • Add Git Bash to Windows
  • Removing the Debug Banner from a Flutter app
  • Useful Flutter Commands

Recent Comments

Wangshu on Unity: DllNotFoundException: o…
Nic on Unity: Clear the console …
Diego Babativa on CUDA Project Import Problem on…
Dungn on Unity: Destroy all child …
Garrett on Unity: DllNotFoundException: o…

Archives

  • November 2022
  • September 2021
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • February 2020
  • November 2019
  • September 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • July 2017
  • May 2017
  • March 2017
  • February 2017
  • November 2016
  • October 2013
  • June 2013
  • May 2013
  • About Me
Grumpy.Code.Dude. Blog at WordPress.com.
  • Follow Following
    • Grumpy.Code.Dude.
    • Already have a WordPress.com account? Log in now.
    • Grumpy.Code.Dude.
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar