i didn't wanted to ask its code but the need of this function? And how it calculates that is it the daylight saving hour or not because every region has different daylight saving period (i.e. at some places it is observed in summer and some places in spring) and they doesn't observe it whole year. Is it calculated by the system time? I am really confused about it
If you are given two DateTimes you might need to adjust one (or both) if it is Daylight savings time if you wish to accurately calculate the TimeSpan between them.
All the rules for daylight savings time are contained within the libraries that are used to figure out what time it is on the system. Since you set your region in Windows itself, it knows which rules to use to figure out if it needs to make the adjustment or not. When the rules change Microsoft patches the time code to include the new rules. I don't know if you noticed, but the documentation references the fact that it only has the current rule, so checking in the past for daylight savings time might be wrong if the rule has changed.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"