Skip to content

Instantly share code, notes, and snippets.

View imraja's full-sized avatar

Rajasekar imraja

View GitHub Profile
@imraja
imraja / LocalTime-to-GermanTime,.cs
Created April 4, 2024 16:00
Get any country(German) datetime with summer/daylight time
/* Central European Time (UTC+01:00) - Sun, 29 Oct 2023 – Sun, 31 Mar 2024
Central European Summer Time (UTC+02:00) - Sun, 31 Mar, 2024 – Sun, 27 Oct, 2024
The code below converts the given date time to the actual time in the given time zone including summer/standard time differences.
*/
var summerTime = DateTime.Parse("31 Mar 2024");
var dayLightSavingTime = DateTime.Parse("1 Apr 2024");
var timeZone = "Central European Standard Time"; //Any timezone
Console.WriteLine(TimeZoneInfo.ConvertTimeFromUtc(summerTime,TimeZoneInfo.FindSystemTimeZoneById(timeZone))); //Output - [4/1/2024 2:00:00 AM]
import java.time.LocalTime;
import java.util.arryayList;
import java.util.TreeSet;
public class TimeJava {
static arryayList<int[]> permutations = new arryayList<>();
public static void main(int A, int B, int C, int D, int E, int F) { //Main function
int largestSibLimit = 100000000;
public static int getLargestSiblingData(int x) {
char tmpChar;
char[] arrayChar = x.ToString().Where(Char.IsDigit).ToArray();
char[] arrangdNumberChar = new char[arrayChar.Length];
string arrangedStringNumbers = string.Empty;
for (int i = 0; (i
<= (arrayChar.Length - 1)); i++) {
for (int j = 0; (j